The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can't Connect Using FTP Account (SFTP)

Discussion in 'General Discussion' started by pilaftank, Jan 28, 2008.

  1. pilaftank

    pilaftank Registered

    Joined:
    Jan 8, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I created an FTP account (cPanel --> FTP Accounts --> Create), but I can't seem to connect using the login information. Of course, I use SFTP (regular FTP is unacceptable since passwords are sent in clear text). I tried Fugu on a Mac and FileZilla on both a Mac and a Windows PC without success.

    My searching around indicates that cPanel does not support SFTP for FTP accounts.

    A feature that forces passwords to be transmitted in clear test seems foolish. If users choose to be foolish on their own, so be it. But forcing users to be foolish is another story.

    It's peculiar that the "Configure FTP Client" feature displays the FTP username, FTP server name, and SFTP port (22). If cPanel does not actually support SFTP for such accounts, this seems like a bug. Why show the SFTP port number if SFTP is not supported?

    Did I simply miss a really obvious checkbox somewhere or do FTP accounts in cPanel force users to transmit their passwords without any encryption at all?
     
  2. bornonline

    bornonline Well-Known Member

    Joined:
    Nov 19, 2004
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    You need to give that user shell access I believe. You could use a client like FileZilla for FTP over TLS. You won't get secure data transport, but you can get secure auth.
     
  3. yapluka

    yapluka Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    France
    cPanel Access Level:
    Root Administrator
    No. It's been a while now that cPanel allows SFTP connection by default, without shell access.
    Only the cpanel user can connect through SFTP, though :)
     
  4. Morley

    Morley Well-Known Member

    Joined:
    Apr 24, 2007
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Really? I am receiving:

    Invalid user user@domain.tld from ::ffff:xxx.xxx.xxx.xxx
    Feb 6 10:49:41 tm sshd[13268]: input_userauth_request: invalid user user@domain.tld

    this user is the main account and I have shall access disabled. Is there any other reason this wouldn't work?

    Thanks
     
  5. yapluka

    yapluka Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    France
    cPanel Access Level:
    Root Administrator
    You need to use the cpanel username : "user" and not "user@domain.tld"
     
  6. Morley

    Morley Well-Known Member

    Joined:
    Apr 24, 2007
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    So to be clear, only the cpanel main user can sftp via ssh2, and any ftp users you add cannot?
    Seems strange because cPanel gives you instructions on how to set accounts up via SFTP, but it doesn't work. I thought it was because there's no shell access for this account but I am reading otherwise. Would someone clarify this?

    BTW, I am able to SFTP as the main user for this account but I'd like to do the same or added accounts.

    Thanks for the reply
     
  7. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    You just can't. SFTP is based off of SSH. SSH is accessible only by server level accounts, i.e. accounts that exist on the server. FTP users that you create in your control panel are just virtual users tied to that particular account. This is why their FTP username have the @yourdomain.com appended to them.

    SSH will only work for usernames that are listed in the /etc/passwd file. These are server level accounts, accounts recognized by the server as existing. As far as the server is concerned joe@yourdomain.com is not a valid user. This part is only understood by the FTP daemon once you connect.

    I suppose you could write an intermediate SSH daemon to handle this level of functionality for the SSH service. That would be the only way to allow these sub users access to SSH.
     
  8. Morley

    Morley Well-Known Member

    Joined:
    Apr 24, 2007
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for the clarification, this is clear to me now.
     
  9. kazar

    kazar Active Member

    Joined:
    May 18, 2008
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    NYC/Earth
    cPanel Access Level:
    Root Administrator
    I just want to point out that for the cpanel user, the sftp configuration file (at least the one for Cyberduck) does not succeed because it prepopulates username@domain.com instead of just username.

    Thanks to the folks on this thread I finally learned I need to delete the @domain.com portion of the username string in order to successfully log in.

    kazar
     
Loading...

Share This Page