vm ubuntu ssh server error login?

Joseph Chrzempiec

Well-Known Member
Jun 9, 2016
142
6
58
44
Hello i have a small problem. when i try to login ssh i get a error saying wrong password. So my question is what username and password am i using to login to, root and password or the username login?
 
Is it a Virtual Maschine or a LXC ConTainer?
The default username is root
If you want to login from outside your network using SSH (e.g. PuTTY) you can try using PermitRootLogin yes in your /etc/ssh/sshd_config
 
Last edited:
Hello yes it is a Virtual machine a VM. I tried root and the password i put there and it keeps saying root@192.168.1.41's password: Access denied
 
Hello i searched online and search So i found something in changing the port from 22 to 10022 i tried that then rebooted ssh services and Now I'm able to ssh with no problem.
 
I been trying everything i can think of for the past 2 days and wondering why why it is not working. On the 63 page of google search i found it just right after i posted in here for help. Shaking my head.
 
I just noticed you are not using a dedicated IP.
So when using port 22 it will connect you to the ssh server of your host which runs on port 22 rather than your VM ssh service.
You can use iptables and prerouting to solve this problem.
 
Your VM's are behind your host, which is behind your router.
So when you trying to reach on of the VM's over the internet, it will go through your router and host before it reaches the VM network.
That means your request to 192.168.1.41:22 will go through your router, to your host and then to the VM.
But your host ssh service is listening on port 22 so unless you change the routing it will not work with the same port.
 

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!