2

I attemp to use WinSCP to connect to my CentOS, but got a access denied reply. My first suspect is that the correspoing service or port, which I don't know, is not enabled.

Could anyone provide troubleshooting steps?

Thanks.

2 Answers2

2

scp uses ssh IIRC, which uses port 22.

You can check if the server is listening with telnet: telnet host-address 22

Then, if the service is not enabled, you should set it up. yum install openssh-server should do it.

1

Make sure that the sshd process is running on your CentOS-machine (ps -ef |grep sshd). Then check if you allow incomming connections to port 22 in iptables by issuing

iptables -L

as root. If you see something along the lines of

ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh

The machines firewall should accept connections to port 22. If you do not have one of those lines, as root, run

iptables -A INPUT -p tcp --dport 22 -j ACCEPT

To allow incomming connections to port 22 (which sshd uses for ssh and sftp).

jeekl
  • 111
  • 2