简体   繁体   中英

I can't connect ssh between VMs

I just tried to create 3 ubuntu VMs on Virtualbox. then I tried to connect each machine to another machine using ssh but it failed.

"I noticed that the 3 VMs has the same IP, So I made static IP to each machine"

So kindly find the below steps:

$ sudo apt install ssh
$ sudo systemctl enable ssh
$ sudo systemctl start ssh
$ sudo ufw allow ssh
$ ssh username@ip

do a test of communication with these vms through ping.

If the communication is ok your problem must be related to the firewall.

You can disable your linux environment's firewall temporarily to test if this is really the problem.

If the problem is due to the firewall, you must create the release rule for a specific port. By default it is port 22.

Test suggestion: Stop SELinux and FirewallD or any other firewall in your distribution and retest

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM