Solved

ssh key from field

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

742 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