Cant ssh to VM after creation with terraform and proxmox

achraf

New Member
Dec 16, 2021
8
0
1
28
hello, i have a problem to connect to vm which i create with terraform, i do not have access to the GUI and serial terminal of the vm.

Code:
root@ns31245211:~# qm config 100
agent: 1
bios: seabios
boot: cdn
cores: 8
cpu: kvm64
ipconfig0: ip=10.0.2.99/24,gw=10.0.2.2
memory: 12288
name: SBG3-P-M-C-AUAG
net0: virtio=7A:CA:32:46:FD:71,bridge=vmbr0
onboot: 1
scsihw: virtio-scsi-pci
smbios1: uuid=70b6bbef-8069-4da9-9714-f6bffebfbb15
sockets: 1
sshkeys: ssh-rsa ****
vmgenid: 7313ba09-1735-4fe4-80d6-ce0f7d0e837d

I have verified that the ssh service is running and listening on port 22. I did not understand anything in the authentication logs
 

Hannes Laimer

Proxmox Staff Member
Staff member
Jul 27, 2020
369
47
28
23
Algund
Hey,

what do you mean you don't have access to the GUI of the VM? For the SSH, can you connect with ssh -o "StrictHostKeyChecking=no" ...? Can you ping the VM?
 

achraf

New Member
Dec 16, 2021
8
0
1
28
hey @Hannes Laimer , thanks for your reply ; the GUI of proxmox that i mean , after ssh -o "StrictHostKeyChecking=no" it's hang and this is the logs :
Code:
Jan 11 16:35:29 ns31245211 sshd[31135]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=61.177.172.87  user=root
Jan 11 16:35:31 ns31245211 sshd[31135]: Failed password for root from 61.177.172.87 port 7760 ssh2
Jan 11 16:35:35 ns31245211 sshd[31135]: Failed password for root from 61.177.172.87 port 7760 ssh2
Jan 11 16:35:39 ns31245211 sshd[31135]: Failed password for root from 61.177.172.87 port 7760 ssh2
Jan 11 16:35:44 ns31245211 sshd[31135]: Failed password for root from 61.177.172.87 port 7760 ssh2
Jan 11 16:35:48 ns31245211 sshd[31135]: Failed password for root from 61.177.172.87 port 7760 ssh2
Jan 11 16:35:52 ns31245211 sshd[31135]: Failed password for root from 61.177.172.87 port 7760 ssh2
Jan 11 16:35:53 ns31245211 sshd[31135]: error: maximum authentication attempts exceeded for root from 61.177.172.87 port 7760 ssh2 [preauth]
Jan 11 16:35:53 ns31245211 sshd[31135]: Disconnecting authenticating user root 61.177.172.87 port 7760: Too many authentication failures [preauth]
Jan 11 16:35:53 ns31245211 sshd[31135]: PAM 5 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=61.177.172.87  user=root
Jan 11 16:35:53 ns31245211 sshd[31135]: PAM service(sshd) ignoring max retries; 6 > 3
Jan 11 16:35:57 ns31245211 sshd[31200]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=61.177.172.87  user=root
Jan 11 16:35:58 ns31245211 sshd[31200]: Failed password for root from 61.177.172.87 port 24796 ssh2
Jan 11 16:36:00 ns31245211 sshd[31200]: Received disconnect from 61.177.172.87 port 24796:11:  [preauth]
Jan 11 16:36:00 ns31245211 sshd[31200]: Disconnected from authenticating user root 61.177.172.87 port 24796 [preauth]
Jan 11 16:37:50 ns31245211 sshd[31451]: Received disconnect from 112.85.42.73 port 52723:11:  [preauth]
Jan 11 16:37:50 ns31245211 sshd[31451]: Disconnected from 112.85.42.73 port 52723 [preauth]
Jan 11 16:38:48 ns31245211 sshd[31586]: Received disconnect from 122.194.229.38 port 33125:11:  [preauth]
Jan 11 16:38:48 ns31245211 sshd[31586]: Disconnected from 122.194.229.38 port 33125 [preauth]

i didnt set a password in the terraform file and it's check for it !
 
Last edited:

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 your own in 60 seconds.

Buy now!