VM SSH

babou29

Member
Dec 29, 2019
8
0
6
43
France
[google translate]
Hello,

I discover your system with joy.
I am trying VMs at home, ...

There is one thing that I cannot do however, it is to connect in SSH to the virtual machines.

Could you tell me how I can activate SSH on my virtual machines please?
(Ps: they are activated in the distribution services installed on the Vm)

Thank you.
Have a good day.
 
so for example, if I want to ssh into my vm inside proxmox. Which IP will provide for the
Code:
ssh root@xx.xx.xx.xx
for it to work
 
I have SSH server installed on the VM (It's an Amazon linux2 guest OS, so SSH come pre-built). when i try to SSH from the host to the VM
Code:
root@dgt:~# ssh ec2-user@192.168.1.10
ssh: connect to host 192.168.1.10 port 22: No route to host

My goal is to be able to SSH into the VM from outside of the proxmox host.
 
That error message means what it says. There is no route to the VM from the Host. It is a network problem. Maybe your VM is on a different subnet than the host, or you have VLAN's set up, or you turned on the PVE firewall, or something else you are not mentioning.

To start, please post the output of "ip a" for host and guest in code tags.
 
For the proxmox host:

Code:
root@dgt:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
    link/ether 80:ee:73:dc:d2:f2 brd ff:ff:ff:ff:ff:ff
3: enp2s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
    link/ether 80:ee:73:dc:d2:f3 brd ff:ff:ff:ff:ff:ff
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000
    link/ether 80:ee:73:dc:d2:f2 brd ff:ff:ff:ff:ff:ff
5: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 80:ee:73:dc:d2:f2 brd ff:ff:ff:ff:ff:ff
    inet 10.111.92.23/24 scope global vmbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::82ee:73ff:fedc:d2f2/64 scope link
       valid_lft forever preferred_lft forever
6: tap100i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vmbr0 state UNKNOWN group default qlen 1000
    link/ether 16:fa:24:29:21:ce brd ff:ff:ff:ff:ff:ff

I cannot highlight or copy the guest outputs from the gui. but below is a screenshot, I hope it suffices
That error message means what it says. There is no route to the VM from the Host. It is a network problem. Maybe your VM is on a different subnet than the host, or you have VLAN's set up, or you turned on the PVE firewall, or something else you are not mentioning.

To start, please post the output of "ip a" for host and guest in code tags.


Screenshot 2024-04-08 at 17.21.13.png
 
Your host and the VM are on entirely different networks (10.111.92.23/24 and 192.168.1.10/24). Assuming that the rest of your network uses 10.111.92.23.xxx/24, you would change the VM to be on that same network. I do not know anything about "amazon linux 2" so I can't tell you how to change the IP of that (this is one of the things that vary between distributions of Linux).

Here is a tutorial on how IP addressing works:

https://www.digitalocean.com/commun...sses-subnets-and-cidr-notation-for-networking
 
  • Like
Reactions: G0ldmember

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!