Hallo,
es sei ein gateway zwischen LAN und Internet. Problem:
bestimmte Nutzer sollen sich per ssh zwar aus dem LAN, nicht
aber aus dem Internet anmelden. Any ideas?
man sshd:
AUTHORIZED\_KEYS FILE FORMAT
$HOME/.ssh/authorized\_keys is the default file that lists the public keys
that are permitted for RSA authentication in protocol version 1 and for
public key authentication (PubkeyAuthentication) in protocol version 2.
AuthorizedKeysFile may be used to specify an alternative file.
Each line of the file contains one key (empty lines and lines starting
with a `#' are ignored as comments). Each RSA public key consists of the
following fields, separated by spaces: options, bits, exponent, modulus,
comment. Each protocol version 2 public key consists of: options, key
type, base64 encoded key, comment. The options fields are optional; its
presence is determined by whether the line starts with a number or not
(the option field never starts with a number). The bits, exponent, modu
lus and comment fields give the RSA key for protocol version 1; the com
ment field is not used for anything (but may be convenient for the user
to identify the key). For protocol version 2 the keytype is ``ssh-dss''
or ``ssh-rsa''.
Note that lines in this file are usually several hundred bytes long
(because of the size of the RSA key modulus). You don't want to type
them in; instead, copy the identity.pub, id\_dsa.pub or the id\_rsa.pub
file and edit it.
sshd enforces a minimum RSA key modulus size for protocol 1 and protocol
2 keys of 768 bits.
The options (if present) consist of comma-separated option specifica
tions. No spaces are permitted, except within double quotes. The fol
lowing option specifications are supported (note that option keywords are
case-insensitive):
**from="pattern-list"**
**Specifies that in addition to RSA authentication, the canonical
name of the remote host must be present in the comma-separated
list of patterns (`*' and `'? serve as wildcards).** The list may
also contain patterns negated by prefixing them with `'!; if the
canonical host name matches a negated pattern, the key is not
accepted. The purpose of this option is to optionally increase
security: RSA authentication by itself does not trust the network
or name servers or anything (but the key); however, if somebody
somehow steals the key, the key permits an intruder to log in
from anywhere in the world. This additional option makes using a
stolen key more difficult (name servers and/or routers would have
to be compromised in addition to just the key).