Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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_*
HashKnownHosts 
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@192.168.1.67:/home
Executing: program /usr/bin/ssh host 192.168.1.67, 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 192.168.1.67 [192.168.1.67] port 22.
debug1: connect to address 192.168.1.67 port 22: Connection refused
ssh: connect to host 192.168.1.67 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

2 Answers 2

Have you copied your public key to 192.168.1.67? 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

 
discard

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.