0% found this document useful (0 votes)
15 views5 pages

SSH Key Generation and Setup Guide

Uploaded by

Blakk Boy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

SSH Key Generation and Setup Guide

Uploaded by

Blakk Boy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

System-A(192.168.0.

38)

[root@client2 Desktop]# ssh-keygen -t rsa -b 2048

Generating public/private rsa key pair.

Enter file in which to save the key (/root/.ssh/id_rsa):

/root/.ssh/id_rsa already exists.

Overwrite (y/n)? y

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /root/.ssh/id_rsa.

Your public key has been saved in /root/.ssh/id_rsa.pub.

The key fingerprint is:

SHA256:DvUZkTsEAU9RySSgWwHNafqj1VyhNcU8tT1DJ66zQC4 root@[Link]

The key's randomart image is:

+---[RSA 2048]----+

| .+++*B+*..o..|

| .=+ .O.+..+.|

| .o. o+o+ .oo.|

| .o ..++o . o|

| ...oE.=.o |

| +oo. . o |

| o .. . |

| . |

| |

+----[SHA256]-----+

[root@client2 Desktop]#

[root@client2 Desktop]# cd /root/.ssh


[root@client2 .ssh]# ls

authorized_keys id_rsa id_rsa.pub known_hosts

[root@client2 .ssh]# ssh-copy-id [Link]

/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@[Link]'s password:

Number of key(s) added: 1

Now try logging into the machine, with: "ssh '[Link]'"

and check to make sure that only the key(s) you wanted were added.

[root@client2 .ssh]# ssh root@[Link]

Activate the web console with: systemctl enable --now [Link]

This system is not registered to Red Hat Insights. See [Link]

To register this system, run: insights-client --register

Last login: Mon May 9 [Link] 2022 from [Link]

[root@server ~]# exit

logout

Connection to [Link] closed.

[root@client2 .ssh]#
System-B

[root@server Desktop]# ssh-keygen -t rsa -b 4096

Generating public/private rsa key pair.

Enter file in which to save the key (/root/.ssh/id_rsa):

/root/.ssh/id_rsa already exists.

Overwrite (y/n)? y

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /root/.ssh/id_rsa.

Your public key has been saved in /root/.ssh/id_rsa.pub.

The key fingerprint is:

SHA256:Qzzi0TlmZEHpN41zdhwcjyrnhs/dRqqX4ZQi3GmYp4g root@[Link]

The key's randomart image is:

+---[RSA 4096]----+

| .=o ... |

| =.. oo |

| o.X o ....|

| . *.o= +.o |

| . [Link] . |

| .==* + .|

| . ..=o+ = |

| E . .+ .=..|

| +o...|

+----[SHA256]-----+

[root@server Desktop]# cd /root/.ssh

[root@server .ssh]# ls
authorized_keys id_rsa id_rsa.pub known_hosts

[root@server .ssh]# ssh-copy-id [Link]

The authenticity of host '[Link] ([Link])' can't be established.

ECDSA key fingerprint is SHA256:vnSHDaXYpZg9PrsUxo5KE0BJG+3EVnZTrslDQAkvpdM.

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@[Link]'s password:

Number of key(s) added: 1

Now try logging into the machine, with: "ssh '[Link]'"

and check to make sure that only the key(s) you wanted were added.

[root@server .ssh]# ssh-copy-id [Link]

/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@[Link]'s password:

Number of key(s) added: 1

Now try logging into the machine, with: "ssh '[Link]'"

and check to make sure that only the key(s) you wanted were added.

[root@server .ssh]# ssh root@[Link]


Activate the web console with: systemctl enable --now [Link]

This system is not registered to Red Hat Insights. See [Link]

To register this system, run: insights-client --register

Last login: Mon May 9 [Link] 2022 from [Link]

[root@client2 ~]# exit

logout

Connection to [Link] closed.

[root@server .ssh]#

You might also like