Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'open stuff remotely' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
open stuff remotely
Authored by: kholburn on Aug 17, '05 04:55:38AM
I tried this using something similar:

 ssh mydesktop open -a TextWrangler2.0.app sftp://fred@remote/~/filename
works quite well.

Unfortunately many of the machiens I want to talk to don't seem to have SSH_CONNECTION. They have SSH_CLIENT but that doesn't have the remote machiens IP number. So I'll have to add stuff to my login scripts.

Nice idea though.



[ Reply to This | # ]
Same issue here: only SSH_CLIENT is defined
Authored by: sjonke on Aug 17, '05 11:41:31AM

From it we can get the Mac's address, but not the host. Is there a unix command that will return the address of the host?

---
--- What?



[ Reply to This | # ]
Same issue here: only SSH_CLIENT is defined
Authored by: baba on Aug 17, '05 10:18:06PM
This depends on the type of *nix.
I found that our Solaris servers provided neither REMOTEHOST nor any SSH environment variable. *Very annoying*
Try 'printenv' to see what's available, or better:
printenv | sort | more

This may work, too:
SSH_HOST_ADDRESS=`host $HOST | cut -f4 -d" "`
or
SSH_HOST_ADDRESS=`host $HOSTNAME | cut -f4 -d" "`
depending on which (if either) is available.

This is the best hint I've seen in a very long time. I've been making do with BBOpen (using plain ftp and an ssh tunnel) for several years. This is much more sensible. Thanks.

[ Reply to This | # ]
Same issue here: only SSH_CLIENT is defined
Authored by: luomat on Aug 25, '05 08:41:04PM

This is what I use to get REMOTEHOST

REMOTEHOST=`who am i | awk '{print $NF}' | tr -d '(|)'`



[ Reply to This | # ]