How to enter machine if we can read .ssh folder ?

I am a stuck at a machine where I am able to read the .ssh folder contents like authorized_keys, id_rsa,id_rsa.pub .

I searched google and i am just starting up(beginner), can anyone tell how to login to ssh with this information in .ssh

(pls pro’s don’t mind my nooby question!)

why you creatin’ a new topic, la casa de papel already has one :wink:

the .ssh dir should contain a private key

private key basically acts as a password here, so you can login to ssh like so:

ssh username@host -i private_key_file_here

yes thats my exact query. i am not able to login with that private key . It is again and again asking for password . And I don’t how to delete this thread. :slight_smile:

you can add your own public key to the file “authorized_keys”
You could take this as reference: Set up SSH public key authentication to connect to a remote system

If you are sure that the private key you got from the machine is valid it also is possible that the file permissions are not accepted. You could change it with chmod 600 id_rsa, this will give the file only rw permission for the owner of the file. (reference: SSH Key: “Permissions 0644 for 'id_rsa.pub' are too open.” on mac - Stack Overflow)

■■■ thanks @evilet that’s what i messed up with “file permission” you are a life saver. Thanks to @Adamczyk also for helping me out :wink: