SSH – Can’t Connect to HyperV Guest (Ubuntu) via SSH

hyper-vsshwindows-server-2019

i can't connect to the virtual machine via SSH. The diagram shows the network and it's connections. On the ubuntu-virtual-machine, the SSH-Server is running.
Do i need to enter (with the ubuntu machine) our Windows-Workgroup to get this done? On the windows server machine an inbound rule for port 22 exists an allows connections (i dont know if it is even necessary).

diagram
network adapters
ubuntu port and ip address
virtual switch

Answers to djomi's questions:

  1. yeah, i can ping from guest to host and client/host and client/guest and vice versa
  2. ssh on localhost works fine (in VM)
  3. see images

iptables 1
iptables 2
iptables 3
iptables 4

Best Answer

For some reason your ufw installation is not allowing ssh connections. You should simply allow them:

sudo ufw allow ssh
Related Topic