Shared SSH Keys Implementation
In this brief article I will be describing how to create a shared key to allow password less logins using ssh.
The concept is simple and works very well when needing to run scripts on remote servers or desktops. The idea is to pretty much authorize the key on the remote end. You can obviously set a password on the key but in this brief example we will use the idea that the network is secured.
Generating Key SSH V.2
> ssh-keygen -t dsa (at password prompt just hit the enter key for no password)
> scp id_dsa.pub user@192.168.x.x:/path/to/home (on local machine)
> mkdir .ssh (on remote machine if it does not exist)
> cd .ssh/ (on remote machine)
> touch authorized_keys2 (on remote machine)
> chmod 600 authorized_keys2 (on remote machine)
> cat ../id_dsa.pub >> authorized_keys2
> cd ..
> rm id_dsa.pub
Now you should be able to login on the remote machine without a password. Btw please be very careful as this would allow an intruder access to your network if not secured properly.
- Login to post comments
- 1046 reads