[Solved] User created in ISPConfig 3 can't login via SSH

Discussion in 'General' started by anark10n, Jan 23, 2018.

  1. anark10n

    anark10n Member

    Hey there
    So, i created a user in ISPConfig 3, gave them a site, but I am unable to log in with said user via ssh. The user is part of the sshuser group, but when I try logging in as the user, it just returns "Permission denied, please try again." What am I missing?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which error do you get in Linux auth.log or syslog file? And how does the line for thts user in /etc/passwd looks like?
     
  3. anark10n

    anark10n Member

    auth.log just lists a lot of sessions opened and closed by user root, nothing for user web1; syslog has nothing relevant to user web1. Don't think i can post syslog as it contains client email addresses in it. Is there a command to retrieve only those relevant entries?
    As for the /etc/passwd line:
    Code:
    sshusers:x:5002:web1,web2,web3,web4,web5,web6,web7,web8,web9,web10,web11,web12,web13,web14,web15,web16
    
    Edit:
    Managed to get something from auth.log:
    Code:
    Jan 23 11:22:21 opensrvr01 sshd[6304]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=41.182.18.227  user=web1
    Jan 23 11:22:23 opensrvr01 sshd[6304]: Failed password for web1 from 41.182.18.227 port 37926 ssh2
    Jan 23 11:22:26 opensrvr01 sshd[6304]: Failed password for web1 from 41.182.18.227 port 37926 ssh2
    Jan 23 11:22:27 opensrvr01 sshd[6304]: Failed password for web1 from 41.182.18.227 port 37926 ssh2
    
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Did you create a ssh user for that website? Web1 looks like the website user.
     
  5. anark10n

    anark10n Member

    Is this the Shell-User in the "Sites" section?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes. The web1 user is not a user to connect to by SSH. You have to create a shell user in ISPConfig if you want to connect to a site by SSH.
     
  7. anark10n

    anark10n Member

    I see. In the Chroot Shell section, do i select none or jailkit?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    If it's your own server and own website, then use none. If the ssh account is for a client, then better use jailkit.
     
  9. anark10n

    anark10n Member

    Okay, got it working. Much thanks.
     
  10. MarekTrzynski

    MarekTrzynski New Member

    I would like to continue this topic, because I still have a login problem, syslog doesn't see any users being created, and there is an entry in the passwd file, but as in the case of another user it lacks the item web163:x:5114 etc..
    Any hint where to look for the reason?

    Please ask me anything, apart root password :)
     
    Last edited: Apr 25, 2019
  11. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    So you have created the SSH user for a website? What happens when you log in? Use
    Code:
    ssh -vv [email protected]
    Are you using jailkit?
     
  12. MarekTrzynski

    MarekTrzynski New Member

    Hi, what i manage to do is change catalog:
    etc own by root
    and i disable jailkit and is working fine.
    in auth.log i saw:
    pam_unix(cron:session): session opened for user root by (uid=0)
    pam_unix(cron:session): session opened for user root by (uid=0)
    Which means root

    But, i still want to use jailkit... but so far thank for help
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    That's cron and not your SSH login. Enable jailkit for the user again in ispconfig, then try to log in and then check the logs (syslog and auth.log) again for errors.
     
  14. MarekTrzynski

    MarekTrzynski New Member

    This what i get when i login using Jailkit
    upload_2019-4-26_10-1-48.png
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    What are the permissions and owner of the bash file inside the jail, for exact path, see error message.
     
  16. MarekTrzynski

    MarekTrzynski New Member

    Well i think is pointless, the whole account are missing files in bin folder once i compare with other
    account. I dont know what went wrong at the time i created.
    Any command i can rebuild this ?
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to fix it with jk_update command:

    jk_update -j /var/www/clients/client60/web91
     

Share This Page