Discussion:
finding my ip address using finger, awk and ping
(too old to reply)
John Battle
2008-11-15 06:39:26 UTC
Permalink
I have seen people use finger (or who) to get their own user name and
then ping it to find their IP address as seen by a computer on the other
side of a VPN. They used awk to filter it on the command line somehow.
Anybody know how to do that? I want to make a better way to get my ip
address as seen by a unix machine on the other side of a VPN, so I can
automate the process of exporting the display.
--
John Battle
Nico Kadel-Garcia
2008-11-15 17:10:49 UTC
Permalink
Post by John Battle
I have seen people use finger (or who) to get their own user name and
then ping it to find their IP address as seen by a computer on the other
side of a VPN. They used awk to filter it on the command line somehow.
Anybody know how to do that? I want to make a better way to get my ip
address as seen by a unix machine on the other side of a VPN, so I can
automate the process of exporting the display.
Why not simply install SSH and run 'ssh -X' to connect to the SCO box and have
X windows displayed locally, and install and use VNC if necessary to share
displays with others?

Even simply logging in with SSH gets you 'SSH_CLIENT' and 'SSH_CONNECTION' as
environment variables you can use.
Bill Campbell
2008-11-15 08:03:17 UTC
Permalink
Post by John Battle
I have seen people use finger (or who) to get their own user name and
then ping it to find their IP address as seen by a computer on the other
side of a VPN. They used awk to filter it on the command line somehow.
Anybody know how to do that? I want to make a better way to get my ip
address as seen by a unix machine on the other side of a VPN, so I can
automate the process of exporting the display.
I have a form on our web site that will show you this:

http://www.celestial.com/showinfo_form

If you are logged into the remote machine with ssh it's easy, use
the command ``echo $SSH_CLIENT''. On the other hand, if you're
using ssh, you don't need to mess with the $DISPLAY as you can
use ssh X11 forwarding, which is (a) far easier than dealing with
$DISPLAY and xhosts, and (b) secure.

Bill
--
INTERNET: ***@celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
Voice: (206) 236-1676 Mercer Island, WA 98040-0820
Fax: (206) 232-9186

War is the health of the state. -- Ralph Bourne
Loading...