15 comment

  1. I want to transfer file to other machine using
    scp or sftp. How can I use the scp or sftp in my
    shell script so that the system takes the password for sftp automatically.

  2. Nice tutorial!

    I was just happy that I found what I needed, but it seems there’s somethig that I’m missing.

    I need user friendly interface to upload/dowload files (for my friends) and rsync (for me 🙂 ). So I uncommented “allowscp”, “allowsftp” and “allowrsync”. I tested ssh, scp and sftp in console and everythig worked as expected, but when I tried to connect with gFTP (I’m using Ubuntu Hardy) and selected SSH2 connection, I was available to browse the direcroties below my user’s home dir. In that case rssh is not really “restricted”. Is this some bug?

    gFTP connects to the remote host with “ssh -e none -l myusername 192.168.0.110 -s sftp”. When I type it in the console and enter the password, the cursor blinks on the next row until I press Ctrl+C. In the auth.log says:
    Connection from 192.168.0.130 port 36633
    Failed none for myusername from 192.168.0.130 port 36633 ssh2
    Accepted password for myusername from 192.168.0.130 port 36633 ssh2
    pam_unix(sshd:session): session opened for user myusername by (uid=0)
    subsystem request for sftp

    I’ll make a post in ubuntuforums.org, but tought it will be usefull for others if we find what’s the reason for this behaviour.

    I would preffer using rssh whithout chroot, so please help me solve this issue.

  3. i use filezilla and got this error:
    Error: Connection closed by server with exitcode 128
    Error: Could not connect to server
    how to resolv this problem?
    thx b4.

    cheers,
    agrd_sn

    1. Nope, you need to add the user account to the rsshusers group 🙂
      Steve.
      ls -la /usr/bin/rssh
      -rwxr-x— 1 root rsshusers 22276 Nov 4 16:27 /usr/bin/rssh

    1. i am facing similar problem which you were facing ?how did you resolve it.
      Error: Connection closed by server with exitcode 128
      Error: Could not connect to server

  4. If I try to connect over ssh, I get an immediate Connection Closed. On Filezilla, I get exitcode 1. Any ideas?

    1. Actually, to clarify: Over ssh, I get an “account restricted by ssh” message, allowed commands: scp sftp. And then a connection closed.

        1. i also have this exitcode 1 issue.

          i can not connect successfully with sftp

          Command: open “[email protected]” 22
          Command: Pass: ********
          Status: Connected to DOMAIN
          Error: Connection closed by server with exitcode 1
          Error: Could not connect to server

          when i login via ssh i get this exitcode error and it disconnects

  5. Thanks, I was getting the connection closed error and adding the user to rsshusers worked!

    /usr/sbin/usermod -a -G rsshusers username

Comments are closed.