How to Setup SSH Login Without Password on RHEL 7
ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to provide secure encrypted communications between two untrusted hosts over an insecure network. X11 connections, arbitrary TCP ports and UNIX-domain sockets can also be forwarded over the secure channel.
ssh connects and logs into the specified hostname (with optional user name). The user must prove his/her identity to the remote machine using one of several methods
Preparation
Here I have prepared 2 servers, And I intend to schedule a backup of files from server 1 to server 2
- Server 1 : 192.168.172.144
- Server 2 : 192.168.172.145
Step One :
Type command on Server 1
# ssh-keygen ( enter, enter, enter )
![]() |
Setup SSH Login Without Password |
Step Two :
Stay on server 1 and write the next command to introduce server 2
# ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
Step Three :
Try ssh login from Server 1 to Server 2
# ssh -i ~/.ssh/id_rsa 192.168.172.145 # ssh [email protected]
if you used the other port can try this methode
# ssh-copy-id -i ~/.ssh/id_rsa.pub "-p 5678 [email protected]"
Makesure its Worked
And then we try to transfer files from server 1 to server 2
# scp onemore.txt [email protected]:/home
Post a Comment for "How to Setup SSH Login Without Password on RHEL 7"