LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   can ping between linux host and linux vm both ways but ssh connection refused (https://www.linuxquestions.org/questions/linux-networking-3/can-ping-between-linux-host-and-linux-vm-both-ways-but-ssh-connection-refused-4175618783/)

sirius57 12-01-2017 06:23 PM

can ping between linux host and linux vm both ways but ssh connection refused
 
I am unable to connect between my opensuse 13.1 host and Slitaz 4.0 guest in virtual box. Guest additions have been installed in the VM. The virtualbox nic is set to bridged so both are on the same subnet. I can ping both ways ok, but I can not establish an ssh connection. It complains with connection refused. I never set up NFS services for a linux network and feel that may be the problem. Is there a way to troubleshoot network services besides using the ping command?

michaelk 12-01-2017 07:00 PM

Verify the ssh server is running on the operating system you want to establish with a remote connection.

Verify if the firewall is running on the above system that it allows incoming traffic on port 22. Post if you changed anything from the default settings.

On the other system (the client) you should be able to run the command:

ssh username@IP_address_of_ssh_server

There are several ways to troubleshoot

nmap -p 22 IP_address_of_ssh_server

telnet IP_address_of_ssh_server 22

sirius57 12-02-2017 09:38 PM

Success! I tested ssh in opensuse with systemctl status sshd | grep active
reply was inactive, so I used systemctl start sshd and ran the above again and it was active.
The ssh service is open in the firewall local network.
On the virtualbox slitaz, I had to install openssh. I had assumed the service was installed beforehand.
I was able to run filezilla and transfer files between the host and guest. Slitaz is a bit different than opensuse in how services are started.

sirius57 12-02-2017 09:43 PM

I also had to use a fixed ip address in the slitaz virtual machine.


All times are GMT -5. The time now is 01:29 AM.