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
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
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
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]
## 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
--
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
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
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.
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
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
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
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]
## 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
--
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
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
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.
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
17 matches
Mail list logo