Server Fault is a question and answer site for system and network administrators. 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 am trying to log into SSH using the terminal:

ssh -p54 -i ~/.ssh/ssh_key

Custom port number 45. Chmod 600 ssh_key.

I know that the SSH key works correctly because I can connect fine via Putty on windows. What could be the problem?

share|improve this question
add -vv to your ssh command line and reconnect. Paste the verbose output. – Zoredache Dec 8 '11 at 19:09
up vote 1 down vote accepted

If you generated the key in Windows using PuTTYgen and copied the key straight over to your linux workstation, it's likely the key is in the wrong format. You should be able to use PuTTYgen to convert the key into the standard OpenSSH format.

As an aside, best practice is to have a unique keypair for each device you connect from. Just generate a new keypair on the linux workstation and add that public key to ~/.ssh/authorized_keys on

share|improve this answer
Exporting direct through putty worked perfect thanks. – John Magnolia Dec 8 '11 at 19:55
Good. You really ought to generate a unique keypair for the mac, though. – EEAA Dec 8 '11 at 19:55

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.