SSH Chroot Problems

Discussion in 'Installation/Configuration' started by sinjab, Jun 13, 2007.

  1. sinjab

    sinjab New Member

    Hi,

    I have successfully chrooted SSH with ISPConfig. Users see there home directory as root using PuTTY and WinSCP (SCP mode). The problem is that users can't transfer files up nor down. WinSCP gives this error:

    WinSCP (SFTP mode) doesn't work at all and gives this error:

    However, FTP works fine.

    WinSCP (SCP mode) also gives this error at startup:

    How can I fix these problems?

    Thanks
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Please put the scp command into the chroot jail.
     
  3. sinjab

    sinjab New Member

    I have done that:

    The error is still there with different return code.

    I also tried adding /usr/bin/scp to APPS in create_chroot_env.sh and running:

    It gave me some mkdir errors because directories already exist but it copied /usr/bin/scp to /var/www/web1/usr/bin. However, the same error is still there.
     
    Last edited: Jun 15, 2007
  4. falko

    falko Super Moderator Howtoforge Staff

    What's the exact error message if you go to the chroot jail and start an scp command on the command line?
     
  5. sinjab

    sinjab New Member

    The the error message of scp is:

    I have created /var/www/web1/dev and copied /dev/null to it. WinSCP (all modes) works!

    Thanks
     
  6. sinjab

    sinjab New Member

    For error:

    I have added this to /var/www/web1/etc/group:

    and the error is resolved.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig adds this line in the groups file normally automatically, maybe you executed the chrooting script manually so it gets not added?
     
  8. edwintenhaaf

    edwintenhaaf New Member

    Same problem here

    Hello,

    I'm havind the same problems using the ssh chroot functions
    in the users /etc/group file you can only see one line with the Root user. Adding the line manualy like Sinjab say's solves the problem for a while but when editing is ispconfig and saving the config it overwrites the group file.

    I have followed the ssh chroot tutorial. In the ispconfig file chrootUsers is set form 0 to 1

    Using debian etch 4.0 and the previous version of ispconfig (not the one released on 23 august)

    Any ideas ?
     

Share This Page