Skip to main content

Posts

Showing posts from November, 2006

connecting to SSH server passwordless

If you have to connect to an SSH server frequently or you want to make a shell script using ssh, you might want to consider connecting to it passwordless. This trick is now new. I have heard about this long time ago but didn't have any necessity for it so I ignored it until recently.

by the time of this writing, I have just completed my script for backup using SSH passwordless. Here I want to share the way I did it in a simple way. I hope it benefits others. Bear in mind that, all ssh utilities like sftp, scp and ssh can use passwordless connection once we complete setup one.

Step 1
Connect to SSH server and open up sshd_config in /etc/ssh or equivalent. Check your distro documentation.Make sure you have the following entries:# Allow Identity Auth for SSH1?
RSAAuthentication yes

# Allow Identity Auth for SSH2?
PubkeyAuthentication yes

# Authorized Keys File
AuthorizedKeysFile ~/.ssh/authorized_keysStep 2
Make RSA keys using ssh-keygen in your home directory of ssh client.
$ cd ~
$ mkdir i…