ssh - Public key authentication issues on cygwin -
i've been trying "ssh localhost" on cygwin (i use windows 7), keeps asking password.
when did "ssh -vvv localhost", found out public key authentications not happening (or failing). hence, asking password.
debug1: authentications can continue: publickey,password,keyboard-interactive debug3: start over, passed different list publickey,password,keyboard-interactive debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: next authentication method: publickey debug1: offering rsa public key: /home/xxxxxxxx/.ssh/id_rsa debug3: send_pubkey_test debug2: sent publickey packet, wait reply debug1: authentications can continue: publickey,password,keyboard-interactive
i'm not sure if unable read authorized_keys file, or if there timeout issue this, or did authentication fail? there way more details?
i have done following steps:
- ssh-host-config. answered yes all.
- generated rsa key , added authorized_keys file.
- net start sshd
- ssh localhost
these permissions:
-rw------- 1 xxxxxxxx mkgroup 402 may 18 16:34 authorized_keys -rw------- 1 xxxxxxxx mkgroup 1675 may 18 16:33 id_rsa -rw-r--r-- 1 xxxxxxxx mkgroup 402 may 18 16:33 id_rsa.pub -rw-r--r-- 1 xxxxxxxx mkgroup 171 may 18 14:33 known_hosts
there couple of issues well: - group displayed mkgroup. - user "xxxxxxxx" not exist in localhost, guess. not displayed in "net user sshd". "xxxxxxxx" domain account. causing public key authentication issue?
just see if there difference in output, deleted authorized_keys file , tried. there no difference in output. still sends packet , proceeds next mode of authentication. there no error message. there other way more details (i'm cygwin , ssh n00b)? find fails while reading authorized_keys file.
quick double-check, did add public key or private key authorized_keys? needs public key.
i notice server not responding "server accepts key..." upon receipt of pubkey_test , have seen when public key missing authorized_keys file on server you're connecting to. should see:
debug3: send_pubkey_test debug2: sent publickey packet, wait reply debug1: server accepts key: pkalg ssh-rsa blen 279
easiest way set use ssh-copy-id work, e.g.,:
# ssh-copy-id localhost
that create authorized_keys file correct permissions. when run this, prompted password, because server doesn't have key. once command runs successfully, you'll able ssh server using identity file. note ssh_config defaults identity file ~/.ssh/identity, ~/.ssh/id_rsa, ~/.ssh/id_dsa, if want use different file, should set alias in ~/.ssh/config.
hope helps.
Comments
Post a Comment