8

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 using ssh 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.

1
  • Was 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.
    – killermist
    May 4, 2013 at 16:16

2 Answers 2

4

Here are some possibilities to try :

  1. Try substituting 127.0.0.1 for localhost.
  2. Verify that the cyg_server user account has a valid home directory (create /home/cyg_server if required) and its shell is /bin/bash.
  3. Uninstall Cygwin completely, clean up its directories and environment variables, and reinstall. The password to use is the one you provide while configuring Cygwin.
  4. 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.

1

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.

5
  • you 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 May 2, 2013 at 5:57
  • Thanks for your consideration, Please let me know what change I need to do here. May 2, 2013 at 5:58
  • 1
    I meant /etc/hosts. The log you provided shows a connection being closed by ::1 (IPv6 localhost), I'm suggesting to use IPv4 instead.
    – dawud
    May 2, 2013 at 7:28
  • Okay, And how to do that (use IPv4 instead of IPv6) ? May 2, 2013 at 8:46
  • Check your interface configuration and deactivate IPv6. Also, ensure you are using IPv4 when resolving localhost (ping it, for example)
    – dawud
    May 4, 2013 at 11:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .