Unable to SSH from host to virtual machine

INDUSTRIAL MONITORING SYSTEM PROJECT ISSUE. I am unable to ssh credential file from host to virtual machine. It is giving following error.

Please look into issue and reply asap @ashwin.salgaocar.
I have checked that there is connection between 2 machines by using ‘ping’ in cmd.

Following is the network connection I have.

Follow these two steps it worked for me.

  1. Change the directory to where your json file is present using cd command.
  2. Use scp -rv file-name user@ip:/dest-path

It’s still not working @mihirsawant24.

@rahulsaxena2000242 The error clearly specifies that the connection was refused. Is the SSH service running on your VM?

To find out, run sudo service ssh status on your VM and share the screenshot.

Also, do share the ip address of the host and VM.

1 Like

Following is being displayed.

Unit ssh.service could not be found.

ip address of VM= 192.168.43.15
ip address of host machine I guess is 192.168.43.1 @ashwin.salgaocar

@rahulsaxena2000242 Install openssh on your VM using the following commands:

sudo apt update
sudo apt install openssh-server

Once the installation is successful, you can check the status of the service by running either: sudo service ssh status or sudo systemctl status ssh. The output should show active (running) as shown here:

If it does not, then run sudo service ssh start.

Thanks sir. It worked.