December 2018
Beginner
826 pages
22h 54m
English
In our examples so far, we've been using IP addresses to connect to our remote host.
SSH is also capable of connecting to hostnames.
First, we have to create a quick hosts entry so that we can resolve our name to an IP address:
[vagrant@centos1 ~]$ echo "192.168.33.11 centos2" | sudo tee -a /etc/hosts
We should now be able to SSH using the host's name:
[vagrant@centos1 ~]$ ssh centos2 ...
Read now
Unlock full access