How to have a sftp user account to backup files

Discussion in 'HOWTO-Related Questions' started by Fabio IT Consultant, Jan 16, 2017.

  1. Fabio IT Consultant

    Fabio IT Consultant New Member

    After more than a year using Ubuntu 14.04 perfect server and ISPConfig 3.1.1 I am still having a problem. The unique user that i can connect with Bitvise FTP and SSH Telnet client (as also with the other ftp/ssh software clients) .
    I have analized and tried all the suggestions at forums to create an sftp user (as we have many websites under this server).
    Tried to create via ISP an ftp user, a shel user, etc but nothing works. Tried to install pureftp-common and etc and also nothing works.
    How can i have a sftp user and directory siple working?
     
    thinhtk41 likes this.
  2. sjau

    sjau Local Meanie Moderator

    If the user can connect through SSH he should be able to connect by sFTP. E.g. in FileZilla you just add server name, user name, passwort, port 22 and you can use it.

    In ISPC it needs to be a shell user. FTP User can't connect through sFTP as sFTP is an extension to ssh: "In computing, the SSH File Transfer Protocol (also Secure File Transfer Protocol, or SFTP) is a network protocol that provides file access, file transfer, and file management over any reliable data stream. It was designed by the Internet Engineering Task Force (IETF) as an extension of the Secure Shell protocol (SSH) version 2.0 to provide secure file transfer capabilities." https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol
     
  3. Fabio IT Consultant

    Fabio IT Consultant New Member

    Thai is the problem, can't. I have a shell user with mmmmmmmmmmmmmmMMmmm long user name (m=lowercase, M= Uppercase)
    Comments: I am aware that FTP and SFTP are different for SFTP been as fact more secure and reliable.
    See below the packages installed regarding ftp:
    ii ftp 0.17-28 amd64 classical file transfer client
    ii openssh-sftp-server 1:6.6p1-2ubuntu2.6 amd64 secure shell (SSH) sftp server module, for SFTP access from remote machines
    rc pure-ftpd-common 1.0.36-1.1ubuntu0.1 all Pure-FTPd FTP server (Common Files)
    rc pure-ftpd-mysql 1.0.36-1.1ubuntu0.1 amd64 Secure and efficient FTP server with MySQL user authentication
     
    Last edited: Jan 16, 2017
  4. sjau

    sjau Local Meanie Moderator

    SFTP is not related to FTP at all. So forget abut ftp, pure-ftpd if you talk about sftp.

    Can the shell user login at the server?
     
  5. Fabio IT Consultant

    Fabio IT Consultant New Member

    No..only root can..
     
  6. sjau

    sjau Local Meanie Moderator

    Then you need to create a shell account for another user.
     
  7. Fabio IT Consultant

    Fabio IT Consultant New Member

    Yeah. i already have it for months and does not work
     
  8. sjau

    sjau Local Meanie Moderator

    I have no idea what you did. If you setup a shell account then that can (usually) access by sFTP.... if that shell user can't login by SSH then that shell user can't use sFTP either (I think)
     
  9. Fabio IT Consultant

    Fabio IT Consultant New Member

    I have just created an account via ISOConfig webgui->sites->shell users.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    You must use a full shell user account for sftp, not a jailed one.
     
  11. Fabio IT Consultant

    Fabio IT Consultant New Member

    Great. It makes sense. I recommend to include a notice at ftp user creation and shell user creation pages to advise isp administrators to does not use jailed to perfectly work as sftp user.
     
  12. Fabio IT Consultant

    Fabio IT Consultant New Member

    The unique problem is when this account is logged in, root or other admin account can't login in via bitvise ftp navigator and ssh telnet terminal.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you tried to create a separate ssh user for sftp use only?
     
  14. Fabio IT Consultant

    Fabio IT Consultant New Member

    yes. but i found what is causing it...if a use a ssh/sftp to upload files fail2ban include the ip source to banned list and once i have used the same ip connection to test an appliance that use this sftp user to upload files, my connection is being refused until the automatically unbann happens.
     

Share This Page