Find the answer to your Linux question:
Results 1 to 3 of 3
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Posts
    4

    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
    Location
    St. Petersburg, FL
    Posts
    5,035
    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:
    Code:
    man 5 sshd_config

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Posts
    4
    Ta very much.

    For those wondering add the line

    AllowUsers [username]

    to the config file.

  4. $spacer_open
    $spacer_close

Posting Permissions

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