So for this lab solution, I'm going to configure the SSH client on Ubuntu.
We already have the SSH server installed on the CentOS system, so I'm going to
use SSH P2022 to 192.168.29.142, which is the IP address of the remote host.
Yes, I'm sure. I want to continue connecting.
And here is my password.
So what do I want to do next? Well, next I want SSH keygen
and that is prompting for the private key as well as the public key.
Oh, it's telling me that.
Oh, what do we have here? I'm on the wrong machine, so that's not good.
We are on Linfen and I don't want to generate the private and public
key on the Centos machine, I want to generate it on the ubuntu machine.
So take 2 SSH keygen to generate the public private key pair.
Do we want the passphrase? Let me show you passphrase as well. So going once and
going twice, and now we have a passphrase and I can use ssh copy id 219-216-829142.
Oh boy. Am I doing something wrong? Yeah, I need P 2022.
That is so inconvenient. In many cases you can put the command option
at the end of the line. But here we really need P2022 before.
This is telling me that I need to enter my password.
And that makes sense. Now I can use SSH
once again to connect to this remote machine.
And there we can see that here. Also, the GNOME graphical interface is taking over. And
you know what, it's good enough for me, I would say cache is key for me
and make sure that it's part of my graphical session. And now we have set up
secure key based SSH authentication between Ubuntu and CentOS, and also between CentOS and Ubuntu.