Now, in every server that we want to login, we should create two files and a directory in home directory of user. Your identification has been saved in /root/.ssh/id_rsa. The output will be something like this: Directory '/root/.ssh'.Įnter passphrase (empty for no passphrase): then it will generate public and private keys and also you can enter a password for your private key. b switch specify number of bits in the key to create. so issue the following command: ssh-keygen -b 4096 IP address: 192.168.239.129 1- Generate Keyįirst we should generate private and public keys. The scenario is that we will put our public key on the servers that we login to it and every time we want to login over ssh, it will login automatically. one as private key and another as public key. as you may know public key infrastructure uses two keys. This method has huge usage specially when you want to setup Ansible for task automation. so here we use a simpler method to authenticate to linux server over ssh. There is sometimes that you need to login to your server alot of times and every time you should enter username and password. Today we want to show you how to login to linux over ssh with public key authentication.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |