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 just uploaded an SSH key to my server and now I can't login anymore... SSH is running on port 3333.

puTTy: pageant failed to answer challenge

Terminal give me this when trying: ssh -vvv " -p 3333"

OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to -p 3333 [] port 22.
debug1: connect to address port 22: Connection refused
ssh: connect to host -p 3333 port 22: Connection refused

I followed this tutorial.

How can I login again?

share|improve this question
up vote 2 down vote accepted

Take the quotes off. You should run

ssh -p 3333

The quotes were needed for ssh-copy-id because ssh-copy-id is just a script that itself calls ssh with the parameters you gave it (where it becomes -p 3333 without quotes), but when running ssh directly, you don't need the quotes.

share|improve this answer
You're right. But the message after ssh-copy-id says something different: Now try logging into the machine, with "ssh ' -p 3333'" That's not correct. – OrangeTux Jun 16 '12 at 1:14
Then you should file that as a bug against whoever manages your ssh package. – DerfK Jun 16 '12 at 1:18

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.