Results 1 to 5 of 5

Thread: How to allow only specific hosts to log on via SSH

Hybrid View

  1. #1
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    How to allow only specific hosts to log on via SSH

    I've set up a SSH server. I know two hosts' IP address that I wanted to allow and only from those two hosts for SSHD. The server is web server so I will need to have anonymous access for Apache to serve.

    How do I limit to only those two hosts? Via /etc/hosts.allow? If so, how to configure? ALL: or portmap?

    Thanks.

  2. #2
    Senior Member
    Join Date
    Sep 2002
    Posts
    421

    Re:How to allow only specific hosts to log on via SSH

    You can use the hosts.allow thing if you're running sshd from inetd, I think. But I always use sshd as stand-alone server, so don't quote me on that.

    What does work is the AllowUsers option in the sshd_config file cause that takes USER@HOST arguments, too, and it accepts wildcards. So

    AllowUsers *@192.168.1.10 *@192.168.1.23 demian@*

    should work.

  3. #3
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re:How to allow only specific hosts to log on via SSH

    Yeah, SSHD is standalone only and I don't have (x)inetd running.

    Thanks. I will give it a shot.

  4. #4
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:How to allow only specific hosts to log on via SSH

    Any modern distro's actually ship sshd configured for (x)inetd ?

  5. #5
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re:How to allow only specific hosts to log on via SSH

    I'm not sure.

    Mine is LFS so it is not even running indetd and I installed SSHD myself as standalone.

Similar Threads

  1. iptables specific ip routing via tun
    By shamora in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 07-15-2011, 03:50 PM
  2. DNS mapping to specific DNS server.
    By lisadone in forum Linux - General Topics
    Replies: 2
    Last Post: 02-02-2007, 03:09 AM
  3. Apache::ASP access to specific hosts only!
    By honey bee in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 11-27-2006, 12:32 PM
  4. Not Linux specific
    By mugs in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 12-07-2003, 12:55 AM
  5. Distro Specific
    By Schotty in forum Announcements and Suggestions
    Replies: 2
    Last Post: 10-30-2002, 12:09 AM

Bookmarks

Posting Permissions

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