Thursday, September 10, 2015

SSH Passwordless Login Using SSH Keygen




SSH Controller :-
1. Create Key Using SSH keygen
                   administrator@IT-SVR-ANZLR:~$ssh-keygen -t rsa
Note :- The above steps will create two key files on the server (private and public keys)
                                           id_rsa and id_rsa.pub
2. Copy key to remote Server - sts009.ictops.in From SSH Controller
Copy the Public key file (id_rsa.pub) from SSH Controller to remote server
                    administrator@IT-SVR-ANZLR:~$scp id_rsa.pub administrator@sts009.ictops.in:/home/administrator
                                      OR
                     administrator@IT-SVR-ANZLR:~$ssh-copy-id administrator@sts009.ictops.in
Note :-The First command just copy the file into the remote server.
Second command copy the files into the remote server in the home directory .ssh folder.If the folder in not present in the remote server
Remote Server - sts009.ictops.in
3. Login into the Server and Create a Directory in home location
                     administrator@AVCETTSTS009:~$ mkdir .ssh
4. Copy the Public Key Contents into authorized_keys under .ssh directory
                     administrator@AVCETTSTS009:~$ cat id_rsa.pub >>~/.ssh/authorized_keys
                     administrator@AVCETTSTS009:~$ chmod 700 ~/.ssh/authorized_keys5. Login from SSH Controller to Remote Server Without Password
                     administrator@IT-SVR-ANZLR:~$ssh sts009.ictops.in
bloggerwidgets