Using the below steps, you can ssh to the server from client without the entering any password.
The machine which run the ssh command is the client
The machine that the client access using ssh is the server
- Run the following command on the client
- -> ssh-keygen -t dsa
- File id_dsa and id_dsa.pub will be created inside $HOME/.ssh
- Copy id_dsa.pub to the server's .ssh directory
- -> scp $HOME/.ssh/id_dsa.pub user@server:/home/user/.ssh
- Change to /root/.ssh and create file authorized_keys containing id_dsa content
- -> cd /home/user/.ssh
- -> cat id_dsa >> authorized_keys
- Change "StrictModes yes" in /etc/ssh/sshd_config to "StrictModes no"
- Restart ssh server
- You can try ssh to the server from the client and no password will be needed
- -> ssh user@server
- Run the following command on the client
- -> ssh-keygen -t dsa
- File id_dsa and id_dsa.pub will be created inside $HOME/.ssh
- Copy the id_dsa.pub to the server's .ssh directory
- -> ssh-copy-id -i ~/.ssh/id_dsa.pub user@server
- Change "StrictModes yes" in /etc/ssh/sshd_config to "StrictModes no"
- Restart ssh server
- You can try ssh to the server from the client and no password will be needed
- -> ssh user@server