SSH Key Based, Password Less Login
It can be very handy to be able to login to an SSH shell without supplying a password. Here's how.
Firstly, on your client machine, generate a keypair. If you are using Windows you can do this using PuTTYgen. If you are on a Nix machine issue:
ssh-keygen -t dsaNext up, we need to copy the public key to the server. If you are on Linux you can use scp to do this:
cd .ssh/
scp id_dsa.pub server_user_name@server.address:./id_dsa.pubIf you are on Windows you could use sftp or similar to transfer the key across. You should end up with a file called id_dsa.pub in your home directory on the server.
Now, on the server, with your regular user account:
cd .ssh
touch authorized_keys2
chmod 600 authorized_keys2
cat ../id_dsa.pub >> authorized_keys2
rm ../id_dsa.pubNow, on Windows fire up a PuTTY session specifying the private key under SSH -> Auth. On Nix, simply give:
ssh -l server_user_name server.addressWith any luck, you will be sorted for password-less login!
SSH Key Based, Password Less Login was originally published by Martin Paul Eve at eve.gd: Martin Paul Eve on December 07, 2008.
Files
10.59348_4s7eb-h5240.pdf
Files
(110.1 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:69da358a0f7214d66f8125b924c93763
|
110.1 kB | Preview Download |
Additional details
Description
Identifiers
- GUID
- https://doi.org/10.59348/4s7eb-h5240
- URL
- https://eve.gd/2008/12/07/ssh-key-based-password-less-login/
Dates
- Issued
-
2008-12-07T00:00:00Z
- Updated
-
2008-12-07T03:11:13Z