Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've created new ssh keys on my dev box a while ago. I did:

ssh-keygen -t rsa -C ""

I copy the key to my shared host.

Now I need to connect using the credentials on the key right ?

What should I write on the command line, in order to connect by using those credentials now?

Please advice, I'm a little lost here.

K. Regards, MEM

share|improve this question
up vote 2 down vote accepted

You fire up a terminal and you ssh the host

ssh username@host.domain.something 

if you have your credentials on the server side you ll be asked about the signature of the host and if you have a passprase you will need to provide it(which you don't as I can get from your keygen).

A bit more inside information in your home directory /home/username/ there is a folder called .ssh which you can reveal with ctrl+h. There you can find all your keys. The keys with extention .pub are the ones you should use in case someones askes you for your key. In the filename also its included the algorithm of encryption.

share|improve this answer
@Chris-Top - I have no clue about the command that I've used. What does the -C or -r mean. I intend to have a passprase. I have provide it (as I recall), after doing this command, it ask me, and I wrote one. Twice. I found that, as you said, that I need to use my shared host ssh USER but, after this key is passed to the authorized_key file, I can use the PASSWORD that was created at key par generation time, INSTEAD of the one provided on my host. Is this precise? At this moment, I do ssh and I get instantly connected, without any password prompt. Why? Thanks a lot. – MEM Mar 24 '11 at 1:07
@mem ssh-keygen -t type [-C comment ] this is how its translated your command. – topless Mar 24 '11 at 1:22
@mem In your sever your will find a file called ssh_config, in most distrubitions like ubuntu its under /etc/ssh/ssh_config, there you can find and uncomment or comment on what you want (password enabled or not) # StrictHostKeyChecking ask to StrictHostKeyChecking no – topless Mar 24 '11 at 1:24
@Chris-top: Thanks. I have this key configurated on my system, and on the remove shared host as well. It seems that, I don't need to tell Ubuntu to recall my password, by using: ssh-agent bash and ssh-add; It seems that Ubuntu does this already somehow? Is this correct ? Please advice. – MEM Mar 24 '11 at 1:26
@Chris-top: My previous answer was wrote without knowing your last comment. Thanks for pointing that out. I just wanted to know if I needto do: ssh-agent bash and ssh-add OR, I could well forget it. I believe this last one is the case, I just need some time to figure this out. Thanks a lot. – MEM Mar 24 '11 at 1:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.