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

Re: ssh ip address



"Eduardo J. Gargiulo" <ejg@linux2.net.ar> writes:

> Hi all.
> 
> Is there any way to obtain the IP address of a ssh client and use it on
> a shell script? I want to put a crontab like
> 
> ssh server script
> 
> but I need the IP address i'm connecting from in the shell script and
> the address is assigned dynamically.


echo $SSH_CLIENT  | awk '{print $1}'

  or

echo $SSH2_CLIENT | awk '{print $1}'


-- 

/*  Dale Southard Jr.  dsouth@llnl.gov  925-422-1463, fax 422-9429  */
/*  Computer Scientist, Accelerated Strategic Computing Initiative  */
/*  L-073,  Lawrence Livermore National Lab,  Livermore CA   94551  */
/*  AFF/I, SL/I, T/I, D-11216, Sr. Rig --- I'd rather be skydiving  */



Reply to: