Re: ssh ip address

2002-03-06 Thread Eric Veldhuyzen
On Tue, Feb 19, 2002 at 01:06:07PM -0800, Dale Southard wrote: Eduardo J. Gargiulo [EMAIL PROTECTED] 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

Re: ssh ip address

2002-03-06 Thread Eric Veldhuyzen
On Tue, Feb 19, 2002 at 01:06:07PM -0800, Dale Southard wrote: Eduardo J. Gargiulo [EMAIL PROTECTED] 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

Re: ssh ip address

2002-02-19 Thread Rich Puhek
Try just doing an `echo $SSH_CLIENT`. Depending on your version, you may need split the output up a bit... --Rich Eduardo J. Gargiulo wrote: 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

Re: ssh ip address

2002-02-19 Thread Davy Gigan
Eduardo J. Gargiulo writes: but I need the IP address i'm connecting from in the shell script and the address is assigned dynamically. echo $SSH_CLIENT, you'll get ip, remote port and local port. -- Davy Gigan System Network Administration [Please no HTML, I'm not a browser]

Re: ssh ip address

2002-02-19 Thread Christoph Moench-Tegeder
## Eduardo J. Gargiulo ([EMAIL PROTECTED]): 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 OpenSSH sets $SSH_CLIENT, containing the client's IP address, the remote and the local port of the connection. Regards, cmt --

Re: ssh ip address

2002-02-19 Thread Jeremy T. Bouse
Have you taken a look at the environment variables that get set when you log in over SSH? For me I find I have a variable appropriately call'd SSH_CLIENT that contains the IP address, local port, and remote port... As simple IP=$(echo ${SSH_CLIENT} | awk '{print $1}') inside your script

Re: ssh ip address

2002-02-19 Thread Karl E. Jorgensen
On Tue, Feb 19, 2002 at 05:35:13PM -0300, Eduardo J. Gargiulo wrote: 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

Re: ssh ip address

2002-02-19 Thread Rishi L Khan
see the SSH_CLIENT environment variable. (set | grep SSH) for bash (w/o the parenthesis) (setenv | grep SSH) for tcsh and csh (w/o the parenthesis) Also, look into getting an account with dyndns so you will have a static FQDN but a dynamic IP that can be looked up.

Re: ssh ip address

2002-02-19 Thread Scott Blachowicz
Eduardo J. Gargiulo [EMAIL PROTECTED] wrote: 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 Try running this: ssh server printenv and see what's in there. For at least some

Re: ssh ip address

2002-02-19 Thread Rich Puhek
Try just doing an `echo $SSH_CLIENT`. Depending on your version, you may need split the output up a bit... --Rich Eduardo J. Gargiulo wrote: 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

Re: ssh ip address

2002-02-19 Thread Dale Southard
Eduardo J. Gargiulo [EMAIL PROTECTED] 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

Re: ssh ip address

2002-02-19 Thread Davy Gigan
Eduardo J. Gargiulo writes: but I need the IP address i'm connecting from in the shell script and the address is assigned dynamically. echo $SSH_CLIENT, you'll get ip, remote port and local port. -- Davy Gigan System Network Administration [Please no HTML, I'm not a browser]

Re: ssh ip address

2002-02-19 Thread Christoph Moench-Tegeder
## Eduardo J. Gargiulo ([EMAIL PROTECTED]): 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 OpenSSH sets $SSH_CLIENT, containing the client's IP address, the remote and the local port of the connection. Regards, cmt --

Re: ssh ip address

2002-02-19 Thread Jeremy T. Bouse
Have you taken a look at the environment variables that get set when you log in over SSH? For me I find I have a variable appropriately call'd SSH_CLIENT that contains the IP address, local port, and remote port... As simple IP=$(echo ${SSH_CLIENT} | awk '{print $1}') inside your script

Re: ssh ip address

2002-02-19 Thread Karl E. Jorgensen
On Tue, Feb 19, 2002 at 05:35:13PM -0300, Eduardo J. Gargiulo wrote: 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

Re: ssh ip address

2002-02-19 Thread Rishi L Khan
see the SSH_CLIENT environment variable. (set | grep SSH) for bash (w/o the parenthesis) (setenv | grep SSH) for tcsh and csh (w/o the parenthesis) Also, look into getting an account with dyndns so you will have a static FQDN but a dynamic IP that can be looked up.

Re: ssh ip address

2002-02-19 Thread Scott Blachowicz
Eduardo J. Gargiulo [EMAIL PROTECTED] wrote: 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 Try running this: ssh server printenv and see what's in there. For at least some versions