Solved

ssh key from field

Posted on 2011-02-17
5
355 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 78

Accepted Solution

by:
arnold earned 500 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 78

Assisted Solution

by:arnold
arnold earned 500 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

740 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