Restrict access to SSH for one specific user
        Posted  
        
            by 
                j0nes
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by j0nes
        
        
        
        Published on 2010-12-27T18:56:06Z
        Indexed on 
            2010/12/27
            19:55 UTC
        
        
        Read the original article
        Hit count: 327
        
I am looking for a way to secure my servers with the following setup: I have a server where I can log in via SSH. The main account there (named "foo") is secured by a keybased login with password. I have another user account (named "bar") that I use to log in via cronjobs running on other servers - this one also has keybased login, but without password.
Now I want to limit access to this machine for the "bar" account. The account should only be accessible via known IPs. However, the "foo" account should not be affected by this, this one should basically be accessible from any IP.
How can I manage this? Or is there a simpler solution to everything?
© Server Fault or respective owner