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.

SSH & SCP works, but not SFTP

Discussion in 'General Discussion' started by domeneas, Aug 28, 2014.

  1. domeneas

    domeneas Active Member

    Joined:
    Sep 20, 2013
    Messages:
    27
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hi there,

    I use Putty for SSH and WinSCP for file transfers without issues authenticating with a PPK key file on my computer.

    WinSCP is set to "Use SCP fallback" if SFTP fails.

    While adding a service today that is to log inn to the server via SFTP to change some file names on demand, I am unable to log in. While troubleshooting, I try to connect with WinSCP without the fallback and it fails, stating "Are you sure this server is running an SFTP server?" or something of the likes.

    The line "Subsystem sftp /usr/libexec/openssh/sftp-server" is in my sshd_config file.

    I have restarted OpenSSH several times.

    Anyone have a clue as to where I could look for a solution?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Have you tried using an alternative SFTP client such as FileZilla, or just using it from the command line, to determine if the issue is isolated to WinSCP?

    Thank you.
     
  3. domeneas

    domeneas Active Member

    Joined:
    Sep 20, 2013
    Messages:
    27
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hello,

    I have now and it does not work and I get an exitcode 127.

    Does the "SubSystem" line also have to be in ssh_config or just sshd_config? Anything in ssh_config I should be looking for?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    That line should exist in /etc/ssh/sshd_config, but you should not have to add it in because it's used by default. Do you have any firewall rules enabled that could be restricting access?

    Thank you.
     
  5. domeneas

    domeneas Active Member

    Joined:
    Sep 20, 2013
    Messages:
    27
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Sorry for the late reply.

    Not that I am aware of, is there an easy way to check iptables specifically for something on port 22 that would block SFTP? I would think it's fine since SCP works, but what do I know.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You could install a firewall management utility such as CSF to more easily manage your firewall rules. Otherwise, feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
Loading...

Share This Page