We help IT Professionals succeed at work.

How to setup SFTP on cPanel connecting with WinSCP

ncw
ncw asked
on
How do I setup SFTP on a cPanel VSP server, hopefully without enabling SSH? I'm using WinSCP which supports SFTP.

I'm aware of FTPS, but I think there may be issues involved with FTPS.
Comment
Watch Question

You can do this, (although I'm not sure how you do it on the VPS admin page)

From the command line,

Add users with no shell (/sbin/nologin)
Edit /etc/ssh/sshd_config and make sure you have the following,
permitRootLogin No

service sshd start

Try sftp from your Winscp client.
Hope this helps..

-Lego
ncw

Author

Commented:
Ok so may be I can do this with a direct file edit. Anyone know if I can do this via the WHM or cPanel control panel.
Linux Server Administrator
Commented:
SFTP is already enabled by default on most cPanel servers. Just try to connect using SFTP. If you face any difficulty please get back to us with the exact error message. Also make sure to enable jailed shell access for that user via WHM >> Manage Shell Access

You can check the FTP configuration through WHM > FTP Server Configuration
ncw

Author

Commented:
Yes SFTP is actually working with no errors on my VPS server. I see there is a setting 'TLS Encryption Support' which I could set to 'Required', would that then disallow FTP and require SFTP?

However I don't think my shared server account supports SFTP (there's no error message).
ncw

Author

Commented:
So SFTP is working on my VPS server and apparently FTPS will be soon be enabled on the shared server. Is FTPS simply FTP over an https connection, ie all you need do is have an SSL certificate installed on the domain and then set the FTP connection url or IP to use https protocol?
LinuxGuruLinux Server Administrator

Commented:
Check the following url and you will get a good idea about FTPS and SFTP.

http://www.codeguru.com/csharp/.net/net_general/internet/article.php/c14329
ncw

Author

Commented:
Great article, thanks.
LinuxGuruLinux Server Administrator

Commented:
No problem. You are always welcome. :)