I'm new to SSH and I've successfully SSHed from local machine to local VM
now I'm trying to SSH into a VM which is hosted by a remote machine.
Here's the error:
vm@vm1-VirtualBox:~$ ssh my_local_name@192.168.***.**
ssh: connect to host 192.168.***.** port 22: Connection timed out
Here's what i have tried:
sudo ufw allow 22
sudo systemctl enable ssh
Both the local machine and the remote VM have client and host ssh, i have tried connecting local to remote VM and vice versa.
One thing i find weird is that ping does not work, i tried pinging the other machine with ping <IP>
but it returns:
ping 192.168.**.*
PING 192.168.**.* (192.168.**.*) 56(84) bytes of data.
^C
--- 192.168.**.* ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 9198ms
And service ssh status
returns:
ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: e>
Active: active (running) since Thu 2022-11-10 01:59:30 +08; 39min ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 16543 (sshd)
Tasks: 1 (limit: 9319)
Memory: 1.8M
CPU: 44ms
CGroup: /system.slice/ssh.service
└─16543 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
Nov 10 01:59:29 Ubuntu-X550CC systemd[1]: Starting OpenBSD Secure Shell server.>
Nov 10 01:59:30 Ubuntu-X550CC sshd[16543]: Server listening on 0.0.0.0 port 22.
Nov 10 01:59:30 Ubuntu-X550CC sshd[16543]: Server listening on :: port 22.
Nov 10 01:59:30 Ubuntu-X550CC systemd[1]: Started OpenBSD Secure Shell server.
checked my ip & username
Where could i have gone wrong ?