I'm trying to transfer a file via ssh but it works only from PC1 to PC2 but it doesn't work backwards.
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 no
Port 22
Protocol 2, 1
And it still doesn't work.
Here's my I/O
:~# scp -v testFile.txt [email protected]:/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?
From your given output it looks like your host isn't accepting connections on port 22.
ssh: connect to host 192.168.1.67 port 22: Connection refused
Check your firewall configuration and make sure it's allowing ssh connections on port 22 from all locations.
Also make sure that you restarted
sshd
after making changes tosshd_config
.You can do this by running
service sshd restart
or/etc/init.d/sshd restart
If you need any further help, post the output of
iptables -L