1. View the Linux host default SSH port
Open Terminal
Input cd/etc/ssh/
View the Ssh_config file as shown in
you can see that the default port for centos7.0 ssh is.
Two. Set up port forwarding in VirtualBox
Because of the network address translation (NAT) used in the network settings, CentOS on the virtual machine is equivalent to a machine under the intranet and needs to be configured for mapping to find
The host port can write any port that is not occupied on the window, the subsystem port must fill port 22nd, for the reasons above, the Linux SSH default port is 22.
When connecting with Putty, populate the host port in the host IP127.0.0.1 (native) and port forwarding, which is mapped to the centos7.0 22 port in the virtual machine.
Three. Test the connection using putty
Enter the user name and password to connect successfully.
Using putty to connect CENTOS7 Linux hosts on local VirtualBox