Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Blocking SSH user logins and running Services as non-root

    Hi all,
    This might be blindingly obvious but I want to block all SSH logins except for one user account.

    In other words I have created a user called fred on the server machine. I want it so only fred can ssh onto the machine. Attempts to connect as root or any other user will be blocked.

    Also I've set up Apache, MySQL and a Tomcat install as services so they auto-start on reboot. How would I get them to run as a non-root user?

    Cheers in advance.

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    St. Petersburg, FL
    Well for the SSH one, you'll probably be able to set that in /etc/ssh/sshd_config. If you need help with the syntax, then you should reference the man page:
    man 5 sshd_config

  3. #3
    Ta very much.

    For those wondering add the line

    AllowUsers [username]

    to the config file.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts