Results 1 to 4 of 4
Hi, I have been trying to establish a connection between two pcs via the ssh channel. I successfully made the connection as a root user, but when i tried as ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-13-2010 #1
- Join Date
- Feb 2010
Passwordless login in using ssh via non root user
Hi, I have been trying to establish a connection between two pcs via the ssh channel. I successfully made the connection as a root user, but when i tried as a non root user i had to type in the password the make contact with the other pc. And besides this could someone tell me how exactly does this passwordless login actually work?
- 02-16-2010 #2
- 02-17-2010 #3
- Join Date
- Nov 2007
Hi kenpachi, i don't know whether this will help but i think its worth a try according to your question.
You need to first generate a private-public keypair using ssh-keygen using this command
#ssh-keygen -t dsa
When that is done, using scp run this command which will transfer the key you generated to the other computer across
#scp ~/.ssh/id_dsa.pub robin@remoteip:~robin/.ssh/authorized_keys
robin is the user account you need to access, so it can be root or a local user.
however that means that the computer you have used to scp the key, will be the only computer that will ssh without password.
Now you can try to login to that machine using ssh. Your key, which you copied to the remote machine, will be compared against your private key to verify your authenticity.
I hope this helps.
- 02-17-2010 #4