Cygwin and automated SSH Login - one user works, the other does not

0

Ok, so I have two windows computers and one linux computer.

I setup cygwin and installed the ssh package. I then opened up the cygwin terminal on each computer and ran ssh-keygen -t -N ''

I then logged into the linux computer, went to the .ssh directory and created an authorized_keys file and pasted in the id_rsa.pub text. User1 works great User2 does not work

I did the same on both computers. Furthermore, if I copy user2's cygwin generated id_rsa.pub contents over to the authorized_keys file for user1...I can get into the linux computer doing user1@linuxcomputer

So this seems like something is wrong on my linux computer with the way the users are setup.

How do I fix this issue? I want each computer with their separate users to be able to log into the linux computer terminal without any password.

user277244

Posted 2016-01-28T23:32:27.690

Reputation: 251

It almost sounds like you have not put the authorized keys files in directories for each user - can you confirm that user1's authorised keys file was in ~user1/.ssh/authorized_keys and user2's in ~user2/.ssh/authorized_keys ? – davidgo – 2016-01-29T02:01:31.047

Yes, exactly as it should be from what I can tell. – user277244 – 2016-01-29T16:23:58.200

Answers

0

Ok I got it. I ran the following:

ssh-copy-id user@123.45.56.78

I must have had a permissions issue. Now it works. Found that info here: https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

user277244

Posted 2016-01-28T23:32:27.690

Reputation: 251