nriley

Member
Oct 22, 2007
10
0
51
I am having a problem loging in with SFTP. Here is what I did:

In the FTP Account Maintenance I created a new user. I then try to login via SFTP and keep getting authentication errors.

If I try to login with the account normally, it works. If I select SFTP I get a Authentication failed error.

I can login via SFTP with the main cPanel account for the domain, just not any accounts I add. Can anyone provide insight on how to fix this?

Thanks
 

nriley

Member
Oct 22, 2007
10
0
51
OK That makes sense since I am creating a FTP user. Is there a way through the cpanel interface to create a shell user account? I started looking at the Create New Account screen but it seemed more oriented to crating a new domain on the box.

I also need to set the user's home directory and restrict them to that dir...
 

closet geek

Well-Known Member
Mar 19, 2004
46
0
156
OK That makes sense since I am creating a FTP user. Is there a way through the cpanel interface to create a shell user account? I started looking at the Create New Account screen but it seemed more oriented to crating a new domain on the box.

I also need to set the user's home directory and restrict them to that dir...
Just use FTP with TLS instead.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
15
313
Houston, TX
cPanel Access Level
Root Administrator
OK That makes sense since I am creating a FTP user. Is there a way through the cpanel interface to create a shell user account? I started looking at the Create New Account screen but it seemed more oriented to crating a new domain on the box.

I also need to set the user's home directory and restrict them to that dir...
Go to WHM -> Account Functions -> Modify an Account then select the user or domain of the account you wish to modify, then click Modify. Then on the following page, check the box labeled Shell Access and click Save. Note, this will only give them jailed shell access.

An alternative way is to go to WHM -> Account Functions -> Manage Shell Access as this gives you control over whether the user has no, jailed or normal shell access.
 

Stefaans

Well-Known Member
Mar 5, 2002
461
4
318
Vancouver, Canada
AS Infopro suggests, only accounts that have actual SSH access can use SFTP.
This comment is not entirely accurate. The full answer depends on your definition of SFTP and the version of cPanel you are using.

The acronym SFTP is used for at least two different connection methods:
* SSH file transfer protocol: Since cPanel 11, this does not require shell access. FileZilla is an example of a client that supports SFTP.
* FTP over SSH (sometimes referred to as Secure FTP): This method does require shell access (I think due to its use of/similarity to scp). An example of a client that uses this protocol is WinSCP.

My recommendation is to keep shell access disabled (unless needed of course) and use a client such as FileZilla that supports SSH file transfer protocol.
 

nriley

Member
Oct 22, 2007
10
0
51
I manually created a user like I should of from the start and its fine. Thanks for the replay guys. I have a much bigger problem now whenever the server gets rebooted the iptables are reverting to the default settings causing nobody to be able to access the box. Bleh!