[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Frage zu ssh "Zugriffs-Mix"



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hallo miteinander,



eine weitere Möglichkeit wäre vielleicht die Verwendung der /etc/sshrc

Dieses Shell-Script wird beim Login ausgeführt, noch bevor die Shell
des Users gestartet wird und bekommt in der Variablen "SSH_CONNECTION"
die Parameter "Source-IP", "Source-Port", "Destination-IP" und
"Destination-Port".

Vielleicht besteht hier die Möglichkeit adressabhängig einen KILL auf
den SSH-Daemon abzusetzen?


Aus der manpage:


SSHRC
     If the file ~/.ssh/rc exists, sh(1) runs it after reading the
environment files but before starting the user's shell or command.  It
must
     not produce any output on stdout; stderr must be used instead.
If X11 forwarding is in use, it will receive the "proto cookie" pair in
     its standard input (and DISPLAY in its environment).  The script
must call xauth(1) because sshd will not run xauth automatically to add
     X11 cookies.

     The primary purpose of this file is to run any initialization
routines which may be needed before the user's home directory becomes
     accessible; AFS is a particular example of such an environment.

     This file will probably contain some initialization code followed
by something similar to:

        if read proto cookie && [ -n "$DISPLAY" ]; then
                if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
                        # X11UseLocalhost=yes
                        echo add unix:`echo $DISPLAY |
                            cut -c11-` $proto $cookie
                else
                        # X11UseLocalhost=no
                        echo add $DISPLAY $proto $cookie
                fi | xauth -q -
        fi

     If this file does not exist, /etc/ssh/sshrc is run, and if that
does not exist either, xauth is used to add the cookie.



LG


Thomas


Am 21.11.2015 um 21:09 schrieb Jochen Spieker:
> Olaf Stölting:
>> 
>> es besteht die  Möglichkeit den Zugriff über die authorized_keys
>> Dati  und den "from" Parameter  einzuschränken, s.a. :
>> 
>> https://www.debian-administration.org/article/685/Restricting_SSH_log
ins_to_particular_IP_addresses
>
>> 
> Danke, Bildungslücke geschlossen.
> 
> Wenn der User das aber nicht selbst ändern können soll, muss man 
> verhindern, dass er seine authorized_keys ändern kann.
> 
> J.
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQCVAwUBVlDciCCyfuBQJJfZAQIRFAP/fgJ2RZMKdfS/0WMOFhOTWBu0nc5VPJ5y
x/iYIxvogbtxmAmyYsKDuVUV2r+KikfbUqCtGvOP4lBEMmfwaCbOS1NKamhdBgoM
ceORss3TYiYaQ5FRVXIhdmL3zpjWx0H2vcqMPZnGUDv15v5RYECeRUeBLRqXtQI6
RW+j7sLyLEg=
=J/SF
-----END PGP SIGNATURE-----


Reply to: