unable to connect via SFTP

Discussion in 'ISPConfig 3 Priority Support' started by aldo, Jul 12, 2013.

  1. aldo

    aldo HowtoForge Supporter

    I just installed ISPConfig on Debian 7 and no user can connect via SFTP.

    Shell users (all Jailed) are correct because they can connect via SSH.

    Using FileZilla SFTP I get:
    Connection closed by server with exut code 1

    Using Bitvise Tunnelier SFTP I get:
    Opening new SFTP session
    Closing SFTP session.

    Using Bitvise Tunnelier SSH I can connect normally.

    Thanks for any help.
  2. till

    till Super Moderator

  3. aldo

    aldo HowtoForge Supporter

    Sorry, not solved.

    I modified the file /etc/jailkit/jk_init.ini (I have no jk.init.ini) as described and restarted fail2ban (/etc/init.d/fail2ban restart) with no luck.

    I noticed that setting "Chroot shell" to "none" the accounts can connect but I need them to be jailed.
  4. Croydon

    Croydon HowtoForge Supporter

    Have you tested with a newly created shell user? I think the changes do not apply to already existing users.
  5. aldo

    aldo HowtoForge Supporter


    I deleted old users and re-created.
  6. aldo

    aldo HowtoForge Supporter

    In /var/log/auth.log I can only see:

    Jul 14 12:36:16 debian7 sshd[5601]: Accepted password for ngtest from port 57656 ssh2
    Jul 14 12:36:16 debian7 sshd[5601]: pam_unix(sshd:session): session opened for user ngtest by (uid=0)
    Jul 14 12:36:16 debian7 sshd[5603]: subsystem request for sftp by user ngtest
    Jul 14 12:36:16 debian7 jk_chrootsh[5608]: now entering jail /var/www/clients/client1/web2 for user ngtest (5005) with arguments -c /usr/lib/openssh/sftp-server
    Jul 14 12:36:16 debian7 sshd[5601]: pam_unix(sshd:session): session closed for user ngtest
    Any idea?
    Last edited: Jul 14, 2013
  7. Croydon

    Croydon HowtoForge Supporter

    I meant creating one that did not exist before (and was deleted). Did you try this?
  8. aldo

    aldo HowtoForge Supporter

    Yes, I tried both, to re-create existing users and also to create new users but without success.

    Now I tried to create a new client, a new website and a new shell user and this time it works. Thank you.

    Is there a way to fix the existing sites/user or I have to re-create them?

    Thank you very much.
  9. Croydon

    Croydon HowtoForge Supporter

    I'm not exactly sure. You could try using the command line tool jk_cp

    Something like
    jk_cp -j /var/www/clients/clientX/webY/./home/userxyz /lib/x86_64-linux-gnu/libnsl.so.1 /lib/x86_64-linux-gnu/libnss*.so.2

    Edit: maybe
    jk_update -j /var/www/clients/clientX/webY/./home/userxyz
    could work, too. I have not tried.
    Last edited: Jul 14, 2013
: sftp

Share This Page