I am not an admin and therefore I do not have access rights to the remote server. I accidentally moved all the files and folders of the remote host to a new folder, so the file ~/.ssh/authorized_keys is not in the right place.

I wanted to know if it is possible to specify the path to this file in the ssh command by the client? (We do -i to specify the location of the key on the client side, but is it possible to do the same thing on the server side?

ssh -i ~/.ssh/id.rsa [email protected] -? <path_to_authorized_keys_on_serveur>

Thanks for your help!


1 Answer 1


You asked if there was any way "to specify the path to this file [on the server] in the ssh command by the client".

No this is not possible.

Either you need to log in with password authentication or ask the systems administrators to move the files and directories back again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .