You are not logged in.

#1 2023-11-28 19:54:19

vikramr
Member
Registered: 2009-09-22
Posts: 45

[Ignore - User Error] Can't login to ssh using keys

I started an SSH server on another machine and disabled passwords. I keep getting permission denied messages when trying to log in with the keys.

ssh 192.168.1.1xx
vikram@192.168.1.1xx: Permission denied (publickey).


ssh-copy-id -i ~/.ssh/old_laptop  192.168.1.1xx
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/vikram/.ssh/old_laptop.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
vikram@192.168.1.1xx: Permission denied (publickey).

tried to copy the key manually on the server as well and restarted it but still get the same error. what am  I missing ?

cat key >> ~/.ssh/authorized_keys

Last edited by vikramr (2023-11-28 22:04:48)

Offline

#2 2023-11-28 20:19:26

gxt25
Member
Registered: 2017-07-05
Posts: 120

Re: [Ignore - User Error] Can't login to ssh using keys

Sending the keys before disabling passwords has always worked for me.


a man a plan a canal panama

Offline

Board footer

Powered by FluxBB