MacOS connections based on the Ubuntu Virtualbox virtual machine via ssh

Previously always ssh connection with Windows software putty, today try to use the macos.

Experimental environment: Host: macos 10.15.3 client: Ubuntu 18.04

By default, Ubuntu is not installed SSH, needs its own installation, sudo apt install openssh-server.

Reopening port 22 sudo ufw allow 22;

Then open the shell in MacOS end, select "New Remote Connection ..." and then select "security shell (ssh)" in the top bar shell tab, select the ip address of the lower-right corner of the "+" sign to fill the target virtual machine , below you can fill in the appropriate information.

It should be noted that the virtual machine's network should be set to bridge mode (so that the host and the virtual machines on the same network segment). Otherwise, the host can not ping the virtual machine. (NAT mode, the virtual machine can ping the host, but the host can not ping the virtual machine)

Accompanying drawings as follows:

Guess you like

Origin www.cnblogs.com/guoendlesslove/p/12320377.html