I'm new to Linux and I'm trying to ssh from one computer to another.
I have two computers:
Computer A is running Windows 10 with VirtualBox running Ubuntu Server 18.04 LTS
Computer B is running Ubuntu 18.04 LTS
Both computers are connected to my home router via Wi-Fi
I want to ssh into the VB Ubuntu server from computer B and I've having trouble.
VB Global Tools > Host Network Manager settings:
DHCP Server: Enable
Adapter: Configure Adapter Manually with IPv4 Address: 192.168.56.1 and IPv4 Network Mask: 255.255.255.0
Network Setting:
Enable Network Adapter: checked
Attached to: Host-only Adapter
Name: name of the adapter
VB Ubuntu Server's ssh and ssh-server is installed and running. service ssh status indicates the service is active and it's listening on port 22. Just to verify that ssh is running fine, I'm able to ssh into VB Ubuntu guest from host using port forwarding method and ssh name@localhost or ssh [email protected]
I assume the port forwarding method is not the solution if I want to ssh from one computer to another; just host to guest (I've tried this method out of desperation and I get the Connection refused error)
Back to the Host-only Adapter method. After doing a ifconfig on the VB Server, I see my new IP address and tried to ping this address from the other computer and get the error:
Time to live exceeded
If I do ssh name@ip I get
ssh: connect to host ip port 22: Connection timed out
What do I need to do to be able to ssh into the VB Ubuntu Server from my other computer?
Thanks
sshto. On Ubuntu Server runfirewall-cmd --permanent ---zone=public --add-port=22/tcpand thenfirewall-cmd --reload. That will open port 22 but to be sure, runfirewall-cmd --list-portsand you should see port 22. Also, runnetstat -tanp | grep 22and that should showsshlistening on port 22. To rule outselinux, open/etc/selinux/configwith a text editor and change the line that saysSELINUX=enforcingtoSELINUX=disabled, reboot, and try again.nanothe selinux conf filesemanage.conf, I don't see the lineSELINUX=enforcingand there are no other conf file under/selinuxdirectory.