2010-11-12 155 views
0

關閉我已經安裝了Cygwin在Windows 2003服務器,我添加openssh包,成立了neccesary環境變量, 運行以下命令Cygwin的SSH問題,無法連接到本地主機,連接通過127.0.0.1

mkpasswd -l > /etc/passwd 
mkgroup -l > /etc/group 
ssh-host-config 
ssh-user-config 

我已經開始了SSH服務,但是當我運行ssh -v localhost我得到以下

debug1: Reading configuration data /etc/ssh_config 
debug1: Connection to localhost [127.0.0.1] port 22. 
debug1: Connection established. 
debug1: identity file /home/RLawton_P/.ssh/id_rsa type 1 
debug1: identity file /home/RLawton_P/.ssh/id_rsa-cert type -1 
debug1: identity file /home/RLawton_P/.ssh/id_dsa type 2 
debug1: identity file /home/RLawton_P/.ssh/id_dsa-cert type -1 
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.6 
debug1: match: OpenSSH_5.6 pat OpenSSH* 
debug1: Enabling compatability mode for protocol 2.0 
debug1: Local version string SSh-2.0-OpenSSH_5.6 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug1: kex: server->client aes128-ctr hmac-md5 none 
debug1: kex: client->server aes128-ctr hmac-md5 none 
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024(1024(8192) sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP 
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY 
debug1: Host 'localhost' is known and matches the RSA host key. 
debug1: Found key in /home/Rlawton_P/.ssh/known_hosts:1 
debug1: ssh_rsa_verify: signature correct 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug1: SSH2_MSG_NEWKEYS received 
debug1: Roaming not allowede by server 
debug1: SSH2_MSG_SERVICE_REQUEST 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug1: Authentications that can continue: publickey, password,keyboard-interactive 
debug1: Next authentication method: publickey 
debug1: Offering RSA public key: /home/RLawton_P/.ssh/id_rsa 
Connection closed by 127.0.0.1 

任何人都可以指教一下,我需要做的就是它的工作?

+0

可能的超級用戶/ ServerFault更合適...... – Amro 2011-07-12 00:28:33

回答

0

我不知道很多關於Cygwin的,這屬於一個評論沒有回答(但我沒有足夠的聲譽還沒有),但...

我發現AndLinux要好得多/比Cygwin更容易使用。它給人的感覺更像一個真正的Linux與Windows共存,它採用的是Linux標準的包管理系統,這可能使安裝除通過Cygwin容易額外的庫或頭。

此外,另一個評論不回答:你可以格式化你的問題,以便更容易使用塊引用或代碼示例格式選項閱讀。

-1

當你安裝了Cygwin和SSH運行,主機的配置,您可能已經創建了用戶名爲「cyg_server」。所以當你連接到ssh時,你需要使用該用戶「cyg_server @ localhost」。

當你與該用戶運行ssh,它會問你,你當您運行的ssh-主機配置提供的密碼。

$ SSH cyg_server @本地
cyg_server @本地的密碼:
上次登錄:週一12月31日1時十四分44秒從2012 :: 1
cyg_server @ polorumpus〜
$
我希望這將是有用。在cygwin.bat

0

如果你真的需要提升的權限從具有管理權限(XP)或帳戶啓動cygwin外殼與R-CLICK和「以管理員身份運行」(Vista中,Win7的)。這應該會導致這個問題。

相關問題