Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Dec 9 '09 at 16:59

This question came from our site for professional and enthusiast programmers.

2 Answers 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.

share|improve this answer

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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.