I'm having trouble copying several very large sql dumps via SSH
I used this command:
/usr/bin/scp -P 2382 /ec2/path/file.sql root@$220.127.116.110:/remote/file/path/
/usr/bin/scp -P 2382 -i My2KeyPair.pem /ec2/path/file.sql root@$18.104.22.1680:/remote/file/path/
Every time I get this:
ssh: connect to host xx.xx.xx.xxx port 22: Connection timed out
-i port switch didn't help.
Source server is an EC2 instance (Amazon Standard linux AMI)
Destination is a dedicated server (CentOS 6.4 minimal)
I googled a lot, one suggestion that came up is to open port 2382 by editing this file:
I entered this code that I borrowed from iptables.old:
*filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 2382 -j ACCEPT -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited COMMIT
and restarted iptables:
But that didn't help either!
I'm clueless, any suggestion would be more than welcome!