authorized_keys2 file has been deprecated as of openssh version 3

allofus

New Member
Messages
183
Reaction score
2
Points
0
Please note, the ~/.ssh/authorized_keys2 file has been deprecated as of openssh version 3, and so only the ~/.ssh/authorized_keys file is managed. These are the ssh keys from the machines which can login to this server without providing password. Make sure you keep this list trimmed.



My ssh keys have gone, all of my automations, which are dependent on these keys are failing left, right and center and I can no longer just import ssh keys using the vps manager (hypervm) and this paragraph above suggests I need to add my keys to a file that does not exist.

Talk about at a loss and actually I think the depreciation notice has always been there so the reason for my keys going are a bit of a mystery.

I have hit the search engines on this one and have come up blank.

I am not really sure what I am supposed to put into the file ~/.ssh/authorized_keys or even where I am supposed to place it.

What a pain.

Can anyone assist me with this please?
 

allofus

New Member
Messages
183
Reaction score
2
Points
0
I managed to figure out how to create a new key and import it into hypervm;

Code:
ssh-keygen -q -f rsakey -t rsa
This creates an rsa public/private key pair

rsakey.pub
rsakey

I was then able to open the public key file and paste it into the SSH Authentication area on hypervm.
Code:
vi rsakey.pub

I downloaded the file 'rsakey' and then opened puttyGEN, clicked load and opened the file, saved it as a .ppk and added that to putty.

I have tried and failed to get my authorized_keys

~/.ssh/authorized_keys

file to make any difference though. So I can use ssh for my root account, but not via the ssh-server on my vps for other user accounts that I have created.

I have been working like this for 9 months now without fixing this and was it not for my ssh keys taking a walk I would not be trying again to work this one out.



I did open a ticket and got replies. It was suggested that the missing keys were stored on my vps, see I reported it as a hypervm fault.

If it was a fault all is working again now so no problem.

SSH to my vps is what I am still stuck on and since I quit on this months ago I shall likely do the same again.




/etc/ssh/ssh_config
/etc/ssh/sshd_config

these files clearly have some role to play here, but I have tried numerous different configurations, tried referencing the authorized_keys file in different ways, put this on, that off etc but no joy.

I have followed this and other guides too
https://help.ubuntu.com/community/SSH/OpenSSH/Keys
and have learned a few neat tricks on the way, but NOT what I set out to do.

Such is life...
 
Top