?
Solved

ssh key from field

Posted on 2011-02-17
5
Medium Priority
?
368 Views
Last Modified: 2012-05-11
In authorized key, if we put from option, only the listed host can come to this host. Even if we put the private key in different location, only
host1, host2 and host3 can come from my example? Is this host based access control?

from="list"
    The sshd server can globally limit which hosts can connect to this machine by using TCP Wrappers, but cannot act on a host-user level. Using the from option, you can allow a given identity to be used only from specific hosts. Hosts are separated by commas, may contain wildcards "*" and "?", or may disallow hosts that are prefixed with "!". As an example, you may have

      from="host1.my_isp.net,host2,host3example.com"
0
Comment
Question by:mokkan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Author Comment

by:mokkan
ID: 34916476
Also, do we need to do anything with tcp_wrapper?
0
 
LVL 79

Accepted Solution

by:
arnold earned 2000 total points
ID: 34916724
tcp_wrapper will reject the connection.
The from="" entry deals with whether the keys can be used depending on the from="" rule.
http://www.manpagez.com/man/5/ssh_config/
It might rely on the setting within sshd_config for VerifyHostKeyDNS
If the key can not be applied/provided the interactive login will be the fallthrough position.
0
 

Author Comment

by:mokkan
ID: 34916823
Does this from field  option work with tcp_wrapper functionality ?
0
 
LVL 79

Assisted Solution

by:arnold
arnold earned 2000 total points
ID: 34917112
The two are two separate things.
tcp_wrappers are used by sshd based on the /etc/hosts.deny /etc/hosts.allow list for the various application on whether the connection should be accepted or rejected.
i.e. you have hosts.deny SSHD: 192.168.12.5
if a user on system 192.168.12.5 tries to ssh to the system, the connection will be refused by sshd.

the from= line within the authorized_keys* seems to deal with whether publickey authentication is permitted from this location.
i.e. lets say all your users have a company laptop and their ssh identity keys are stored on servers for quick logins. The users do not have/know their passwords. You add this entry to prevent the users from accessing the systems when they are outside the LAN.
from="!on_LAN"
0
 

Author Closing Comment

by:mokkan
ID: 35062907
thank you
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question