Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question

migrated from Dec 9 '09 at 16:59

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

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


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