restricting ssh login based on IP

Steven Susbauer steven at too1337.com
Sat Feb 26 21:31:30 UTC 2011


On 02/25/2011 11:38 PM, Tapas Mishra wrote:
> Hi,
> 
> I would like to allow a user to login through SSH but with different
> permission coming from different ipaddress.
> 
> For example, a user "tester" login to SSH through 192.168.1.1 and
> another user login with the same login id "tester" but from different
> ip 192.168.1.2.
> 
> How do I restrict 192.168.1.2 to only allow for viewing the content in
> the home directory while giving 192.168.1.1 full access?


Very "experimental" as in I haven't tried myself, you could create a
user "tester" with full access to their home directory, and then create
a user "tester2" (or something else), but assign them the same home
directory. If the home directory is owned by tester and locked down so
others can only read and execute, theoretically the tester2 user would
only be able to read and execute, but it would still be "their" home
directory.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 551 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20110226/f4125de4/attachment.sig>


More information about the ubuntu-users mailing list