Cygwin Connection closed by ::1
Solution 1
Here are some possibilities to try :
- Try substituting
127.0.0.1
for localhost. - Verify that the cyg_server user account has a valid home directory (create
/home/cyg_server
if required) and its shell is/bin/bash
. - Uninstall Cygwin completely, clean up its directories and environment variables, and reinstall. The password to use is the one you provide while configuring Cygwin.
- Try using your normal account instead of cyg_server that is suggested by the Cygwin installation.
I don't understand why your post is tagged "linux" when you are using Cygwin - it should in this case be "windows". In this case, have a look at this article : Running hadoop in Windows.
Solution 2
The cyg_server
user is not intended for direct use.
Check your /etc/hosts
file for correctness, check that it explicitly resolves localhost to 127.0.0.1.
If you don't need IPv6, deactivate it.
manurajhada
Updated on September 18, 2022Comments
-
manurajhada over 1 year
During the installation of Hadoop I am trying to setup CYGWIN and
ssh
. Installed and ssh also started successfully and setup authorization key as instructed HERE but When I try to connect to the localhost usingssh
it says..$ ssh -v localhost OpenSSH_6.2p1, OpenSSL 1.0.1e 11 Feb 2013 debug1: Reading configuration data /etc/ssh_config debug1: Connecting to localhost [::1] port 22. debug1: Connection established. debug1: identity file /home/manu/.ssh/id_rsa type 1 debug1: identity file /home/manu/.ssh/id_rsa-cert type -1 debug1: identity file /home/manu/.ssh/id_dsa type -1 debug1: identity file /home/manu/.ssh/id_dsa-cert type -1 debug1: identity file /home/manu/.ssh/id_ecdsa type -1 debug1: identity file /home/manu/.ssh/id_ecdsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.2 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2 debug1: match: OpenSSH_6.2 pat OpenSSH* debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr [email protected] none debug1: kex: client->server aes128-ctr [email protected] none debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ECDSA ec:bb:51:bb:d4:74:8f:27:49:8c:ef:59:a6:2b:ab:59 debug1: Host 'localhost' is known and matches the ECDSA host key. debug1: Found key in /home/manu/.ssh/known_hosts:1 debug1: ssh_ecdsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent 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/manu/.ssh/id_rsa Connection closed by ::1
After lots of googling I tried
ssh -v cyg_server@localhost
but it promt for password which I don't know..$ ssh -v cyg_Server@localhost OpenSSH_6.2p1, OpenSSL 1.0.1e 11 Feb 2013 debug1: Reading configuration data /etc/ssh_config debug1: Connecting to localhost [::1] port 22. debug1: Connection established. debug1: identity file /home/manu/.ssh/id_rsa type 1 debug1: identity file /home/manu/.ssh/id_rsa-cert type -1 debug1: identity file /home/manu/.ssh/id_dsa type -1 debug1: identity file /home/manu/.ssh/id_dsa-cert type -1 debug1: identity file /home/manu/.ssh/id_ecdsa type -1 debug1: identity file /home/manu/.ssh/id_ecdsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.2 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2 debug1: match: OpenSSH_6.2 pat OpenSSH* debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr [email protected] none debug1: kex: client->server aes128-ctr [email protected] none debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ECDSA ec:bb:51:bb:d4:74:8f:27:49:8c:ef:59:a6:2b:ab:59 debug1: Host 'localhost' is known and matches the ECDSA host key. debug1: Found key in /home/manu/.ssh/known_hosts:1 debug1: ssh_ecdsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent 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/manu/.ssh/id_rsa debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Trying private key: /home/manu/.ssh/id_dsa debug1: Trying private key: /home/manu/.ssh/id_ecdsa debug1: Next authentication method: keyboard-interactive debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: password cyg_Server@localhost's password: debug1: Authentications that can continue: publickey,password,keyboard-interactive Permission denied, please try again. cyg_Server@localhost's password: debug1: Authentications that can continue: publickey,password,keyboard-interactive Permission denied, please try again. cyg_Server@localhost's password: debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: No more authentication methods to try. Permission denied (publickey,password,keyboard-interactive).
Can someone please help me to establish a successful authenticated ssh connection with localhost.. Either by password or by creating another user or skipping authentication step.. It would be great to me! Thanks.
-
killermist about 11 yearsWas going to rephrase your title to question, but after reading the body, I'm confused as to what you're asking. Sounds like "Why can't I log into an SSH instance on Cygwin?" but the details befudddle me.
-
-
manurajhada about 11 yearsyou mean
hosts.allow
? M pasting the content of file here..ALL : localhost 127.0.0.1/32 [::1]/128 [::ffff:127.0.0.1]/128 : allow ALL : PARANOID : deny sshd: ALL : allow
-
manurajhada about 11 yearsThanks for your consideration, Please let me know what change I need to do here.
-
dawud about 11 yearsI meant
/etc/hosts
. The log you provided shows a connection being closed by ::1 (IPv6 localhost), I'm suggesting to use IPv4 instead. -
manurajhada about 11 yearsOkay, And how to do that (use IPv4 instead of IPv6) ?
-
dawud about 11 yearsCheck your interface configuration and deactivate IPv6. Also, ensure you are using IPv4 when resolving localhost (
ping
it, for example)