Can't execute $SSH_CONNECTION in Linux

16 views
Skip to first unread message

Wm Landers

unread,
Nov 20, 2014, 7:35:38 AM11/20/14
to openssl...@googlegroups.com
I hope it is ok to ask such a question here.

  In Linux Debian, I am able to execute the $SSH_CONNECTION command in a terminal window, as well as a terminal execution of a script (./test.sh) and it returns both the connecting and local IP addresses.

echo $SSH_CONNECTION | awk '{ print $1" "$3}'

  However, when execute the ./test.sh with a cron job, the script will not return the IP addresses.  It seems that I need an 'export PATH=$PATH:...' in my script, but after trying almost every path concerning OpsnSSL, it still doesn't return the IPs.

Any suggestions will be appreciated.  LinuxQuestions couldn't come up with an answer.

Thanks.
Reply all
Reply to author
Forward
0 new messages