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@$22.214.171.1240:/remote/file/path/
/usr/bin/scp -P 2382 -i My2KeyPair.pem /ec2/path/file.sql root@$126.96.36.1990:/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!