Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
84
rated 0 times [  84] [ 0]  / answers: 1 / hits: 174822  / 1 Year ago, fri, january 27, 2023, 6:33:33

I need to use another computer to access my ssh server. This is because a recently implemented vpn at my university doesn't work on my current computer and I have lost access to the server.



I ssh via encrypted ssh keys. Can I copy these keys to the new computer (on which the vpn works). I tried copying the id_rsa and id_rsa.pub files in the ~/.ssh folder but it doesn't recognize the keys and there is no prompt to input a password to decrypt the keys.



EDIT: I can't access the server to generate a new key pair for the new computer and am out of the country so can't physically access it.



Thanks.


More From » ssh

 Answers
5

Check the permissions and ownership of your private key file. From the manual,




These files contain sensitive data and should be readable by the user but not accessible by others (read/write/execute). ssh will simply ignore a private key file if it is accessible by others.




Typically the key files should look like this,



$ ls -l ~/.ssh/id_rsa*
-rw------- 1 benj benj 1766 Jun 22 2011 .ssh/id_rsa
-rw-r--r-- 1 benj benj 388 Jun 22 2011 .ssh/id_rsa.pub


which you can enforce via:



$ chown benj:benj ~/.ssh/id_rsa*
$ chmod 600 ~/.ssh/id_rsa
$ chmod 644 ~/.ssh/id_rsa.pub

[#38561] Saturday, January 28, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
arsleyeuth

Total Points: 72
Total Questions: 121
Total Answers: 112

Location: North Korea
Member since Mon, Oct 31, 2022
2 Years ago
;