Short question:

I got a task to update a git repository. Information I received is following: host, port, user name and ssh key's passphrase with information that key's type is rsa. How can configure PC to connect without using a password? Is it enough information to do that?


  • My OS: XUbuntu 14.04
  • It's clear that the passphrase is passphrase for ssh key, not password.
  • I do not have access to the server. I cannot configure ~/.ssh/ on it any way.
  • I did not receive the key itself.

Long story / how I tried to solve this problem:

  • Google it. I generated ssh key using ssh-keygen -t rsa entering the passphrase. However each time I generated a key, it was different which leads me to another (sub) question: is it possible to get ssh-rsa key knowing only the passphrase? By other words, did I receive too little information? (Problem is that my knowledge about ssh and cryptography is too small and I'm unable to find on the Google answer to this additional question; I don't know - and cannot find the information - whether the key is based on the passphrase (like in case of hashes) or whether it's additional or secondary information (like in case of hashes with salt or similar to encrypting with TrueCrypt which encrypts only header with the password and whole disc is encrypted with a key stored in the header).)
  • Originally I tried to use ~/.ssh/config file, but in order to confirm that problem lies within the key, I backed it up, cleared and now I'm generating the keys into ~/.ssh/id_rsa.
  • I tried to find whether I should take completely different steps (not generate it using ssh-keygen -t rsa but by another way), however I was unable to find a thing.

Additional information

  • I also received a password which works. I can connect to the git repository with it, but I'm looking for a way to work with just key.
  • It's not allowed to connect to interactive shell using ssh. Only git over ssh is supported.

1 Answer 1


You can't derive a private key from a passphrase. The passphrase is used to encrypt the private key; the private key is needed to have an encrypted conversation with the remote server. You don't have enough information to connect without a password.

Also, it's very bad security practice to share a private key. A better method is to generate your own key pair and add your public key to the remote server at


If you could SSH in you could do this yourself, but since you can't, someone else would need to do it for you.

  • 1
    This is the best answer imo. Other options are outlined in stackoverflow.com/q/1924464/2687324 Commented Apr 5, 2015 at 13:20
  • I see, thank you very much! In that case my main problem was lack of knowledge about ssh; regrettably I can't do what you described even though I would like to. Thanks
    – Neelam
    Commented Apr 5, 2015 at 13:23

You must log in to answer this question.

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