VM ssh permission denied

techques100

New Member
Aug 2, 2023
2
0
1
I recently installed Proxmox and started several VM's Ubuntu, Debian and Rocky linux. I am unable to use ssh keys in all VM's for some reason and receiving permission denied. I have deployed these OS's via kvm many times with no issue. If I use ssh-copy the key is transferred but still receive error. I have checked the ,ssh and known_hosts and the ownership and permissions are correct. Any suggestions?

user@LAPTOP:~$ ssh user@192.168.1.xx
hostkeys_find_by_key_hostfile: hostkeys_foreach failed for /home/user/.ssh/known_hosts: Permission denied
The authenticity of host '192.168.1.123 (192.168.1.xxx)' can't be established.
ED25519 key fingerprint is SHA256:XFF2lfzk7bkbJOSy4wB77llutT5FSwRrxxjbfiiJEZ8.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Failed to add the host to the list of known hosts (/home/user/.ssh/known_hosts).
user@192.168.1.xxx's password:
client_input_hostkeys: hostkeys_foreach failed for /home/user/.ssh/known_hosts: Permission denied
Last login: Wed Aug 2 14:51:06 2023 from 192.168.1.xxx
[gtcnet@localhost ~]$
 
The permission problem appears to be on your client "LAPTOP", based on the output you provided, at least with "/home/user/.ssh/known_hosts".
Fix that and then try again, add -vvv if necessary.

There is nothing that PVE changes in the guest VM installation, those are normal Linux servers. If you have a common ssh issue across 3 independent VMS, chances are that your client is the issue.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

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!