Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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'm trying to transfer a file via ssh but it works only from PC1 to PC2 but it doesn't work backwards.

My recievers firewall is disabled

I've checked my ssh_config files and both are the same. Which is basic:

Host *
SendEnv LANG LC_*
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no

Because i've also trying adding this to the recievers ssh_config

PasswordAuthentication yes
Port 22
Protocol 2, 1

And it still doesn't work.

Here's my I/O

:~# scp -v testFile.txt user@
Executing: program /usr/bin/ssh host, user root, command scp -v -t /home
OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to [] port 22.
debug1: connect to address port 22: Connection refused
ssh: connect to host port 22: Connection refused
lost connection

What am I missing?

share|improve this question
Is sshd running on both hosts? Do you have some NAT-box between the hosts? – Kride Mar 1 '13 at 21:01
@Kride SShd is running on both hosts. I checked it with ps aux | grep sshd And there's nothing between the hosts .. – AAlvz Mar 4 '13 at 15:39
Adding more verbosity might give some clue. Try "scp -vvv" or "ssh -vvv" – Kride Mar 5 '13 at 19:07
Does plain simple ssh also fail with Connection refused ? – Hennes Mar 24 '13 at 19:19

Have you copied your public key to If not you need to enable PasswordAuthentication. It should be "yes", if you like to use a password.

share|improve this answer
I've enabled passAuth and i'm having the same problem... – AAlvz Mar 24 '13 at 19:07
up vote 0 down vote accepted

The problem was not in the ssh_config .

The problem was in the sshd_config

There, to access with password, just enabled the line

PasswordAuthentication yes

Then, restarted the ssh service

That was the problem

share|improve this answer

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.