Generating public/private ssh keys
How to generate and use public / private ssh keys
This guide is tested on Centos 6
To generate RSA ssh key pair enter following command:
To generate DSA ssh key pair enter following command:
You will be prompted to specify a path to locate the keys
You can specify it or just press "enter" to accept default location.
Now you have the keys generated. The keys are id_rsa and id_rsa.pub.
Copy id_rsa.pub to remote host(s) in user directory, for example /home/alex/.ssh/ or ~/.ssh, and rename it to authorized_keys. Copying can be done with scp:
If you have an issue like "command not found" install ssh clients on both sides entering:
Now open /etc/ssh/sshd_config on remote host and set following attributes:
Restart ssh service
To add one more public key to remote host simply append the key to existing authorized_key manually or using command:
If you can't get why it doesn't work make sure you have selinux disabled
Was this answer helpful?
In Centos: 1. Edit old mac HWADDR=XX:XX:XX:XX:XX:XX in the file...
If you want to redirect/nat some traffic to IP 22.214.171.124 via IP 126.96.36.199, it simply can be done...
How to install nginx on Centos Add nginx repo first. To add it, create the file...
§ Install OpenVPN Access Server Be sure that you are using a clean system and no...
How to install squid with tor [NOTE: According to vpsget.com AUP/TOS you can use private proxy...