Passwordless ssh setup
If you want to use passwordless ssh login feature, you should use public key authentication mechanism. To do this, remote server must be configured to enable public key authentication (enabled by default) and you should have an ssh public/private key and store your public key at the remote side's special file: ~remote-user/.ssh/authorized_keys
Remote server setup: Check the following lines exists and uncommented in the /etc/ssh/sshd_config, if not you must add it and restart ssh server at the remote side:
RSAAuthentication yes
PubkeyAuthentication yes
Local setup: You must generate an public/private key pair for your own if it's not generated before:
ssh-keygen -t rsa
You can select defaults just hitting enter a few times. After that your public key will be in the ~/.ssh/id_rsa.pub file, you must add this file content's to ~remote-user/.ssh/authorized_keys file. You can scp to copy id_rsa.pub at the remote side and after that you can append id_rsa.pub contents into authorized_keys file at the remote side.
This is a trivial process and there is a special script utility which basically makes this copy and append task called ssh-copy-id:
ssh-copy-id remote-user@remote-host
Now, you can login without entering password.
- 0 Comment
- Murat Demirten
- 26 Apr 2008, 09:56
-
You must be login first or sign-up for an account to post comments.
USERBOX
CATEGORIES
MOST READ TODAY
- Disabling reverse dns lookups in ssh
- Syntax highlighting in less
- Users with /bin/false shell to login on vsftpd
- Disabling ssh password authentication
- XFS Filesystem has duplicate UUID problem
- Enabling remote desktop on a VirtualBox Machine
- Superblock backups for ext2 and ext3 partitions
- Redirecting tcp / udp ports with socat
- Booting from an ISO image using qemu
- How to record a linux session
LAST ADDED
- Using iPhone internet sharing over bluetooth under Linux
- Using USB sound card with amarok
- Multi-conditional search and replace (clearing a ftp trojan script example)
- Disabling ipv6 functionality
- How to convert a mp3 file
- How to choose the fastest Debian mirror
- Disabling reverse dns lookups in ssh
- Rewriting destination ip address
- Deleting A File By It's Inode Value
- Learning which libraries are used for a binary
