IP adresa stanice na serveru

Houmles h na n.cz
Čtvrtek Srpen 26 14:45:23 CEST 2004


caj,
nevim esli to neni vrtani se v blbym hrobu, ale pri ssh -X se promenna
$DISPLAY nastavi sama... dokonce maly prispevek z manualove stranky ssh:

ssh will normally set the following environment variables:

DISPLAY The DISPLAY variable indicates the location of the X11 server.
It is automatically set by ssh to point to a value of the form
``hostname:n'' where hostname indicates the host where the shell runs, and
n is an integer >= 1.  ssh uses this special value to forward X11
connections over the secure channel.  The user should normally not set
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DISPLAY explicitly, as that will render the X11 connection insecure (and
^^^^^^^^^^^^^^^^^^
will require the user to manu ally copy any required authorization
cookies).



On Thu, 26 Aug 2004, Martin Calko wrote:

> Jan Houstek wrote:
> >>Snazim se zjistit IP adresu stanice se ktere jsem prihlasen k serveru.
> >>Pri prihlaseni mi sice shell (?) vypise odkud jsem se prihlasil minule
> >>ale v promennych prostredi ani jinde se mi nedari najit adresu odkud
> >>jsem prihlasen ted.
> >>
> >>Chci to pouzit pro nataveni promenne DISPLAY. Pokud existuje nejaky
> >>elegantni zpusob jak ji nastavit na adresu oddkud jsem aktualne pripojen
> >>zajimal by mne.
> > Je-li to pres SSH, tak mate IP adresu v promenne $SSH_CLIENT.
>
> Ano, to je pravda. Dekuji.
>
> Jeste drobnost - neni tam pokud pres "su - ..." prejdu pod nekoho
> jineho. Da se zjistit i pak?
>
> Neco jsem taky nasel ve vystupu z "w" a "who". Bohuzel se mi nedari
> ztotoznit konkretni polozku se sebou protoze to neukazuje id procesu.

ehm... to je sice pravda, nicmene vam to ukaze oznaceni terminalu a podle
toho si muzete grepnout z ps axuw procesy ktere vas zajimaji.. a nebo
netstat -ptn - ukaze vam veskere navazane konexe vcetne PID (-p)


:wq
 Houmles, h na n.cz, sherlock na inway.cz

lsd fbi cia drugs mafia weapons guns pedophilia fuck - hi Echolon!


Další informace o konferenci Linux