[root@server ~]# useradd redhat
[root@server ~]# su redhat
[redhat@server root]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/redhat/.ssh/id_rsa):
Created directory '/home/redhat/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/redhat/.ssh/id_rsa
Your public key has been saved in /home/redhat/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:R1ketbj1GS6AOYJ1XSnILFW1kSf7OhIYhw95smD69D4 redhat@server
The key's randomart image is:
+---[RSA 3072]----+
| .+o+.==+ |
| o..+o* *oo |
| . ..+=.+.*. |
| o.B.o.+..o|
| o S @ ...o.|
| . . + o .. |
| o . . . |
| . E . o |
| ... . . |
+----[SHA256]-----+
[redhat@server root]$ ssh-copy-id -i /home/redhat/.ssh/id_rsa.pub root@192.168.203.128
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/redhat/.ssh/id_rsa.pub"
The authenticity of host '192.168.203.128 (192.168.203.128)' can't be established.
ED25519 key fingerprint is SHA256:r7fRpCT9/IW5pCJblgC6x1oklFIbWrtevEG0qnbwGeY.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.203.128's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'root@192.168.203.128'"
and check to make sure that only the key(s) you wanted were added.
[redhat@server root]$ ssh root@192.168.203.128
Activate the web console with: systemctl enable --now cockpit.socket
Register this system with Red Hat Insights: insights-client --register
Create an account or view all your systems at https://red.ht/insights-dashboard
Last login: Tue Jul 18 11:07:45 2023 from 192.168.203.1
[root@server ~]#