Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSH ENVIRONMENT

Status
Not open for further replies.

johny2K

Technical User
Dec 19, 2001
184
CA
I'm having problem getting the right "env" for SSH. This is currently happenning after logging in to the RH server using SSH. I can run any program with no problem using telnet. It looks like that when using SSH with same LOGIN ID as what I'm using with telnet - SSH couldn't hold the actual environment variables.

1.) Is there any parameters or setup I should look into to resolve this?

2.) Also, i setup/configured VPN to aknowledge incoming SSH from a particular IP, but I got "ssh: connect to host XXX.xxx.xxx.xxx port 22: Connection refused (xxx=public IP address). Locally (meaning, within LAN), I can SSH the RH server.
















 
Could you please post more detail?

Which environment variable(s) are you having problems with?
What is it set to when you use telnet?
What is it set to when you use ssh?
What config file sets that specific environment variable?

Depending on which distribution you use, it does different
things with the .bashrc and .bash_profile and /etc/bashrc and
/etc/profile (if all of those even exist).
 
my mistake, first - i am using RH9 and using only one login ID.

i isolated my original problem but (still searching and unanswered) it should be on a different UNIX OS forum.

Right now, my inquiry - what's the difference between . (dot-space) and ./ (dot-slash) ?

my script, TEST under /home/tora2:

echo SET: `date`
HOME=/home/data/; export HOME
DATA=/usr/data/; export DATA

USING SSH:

[tora2@ tora2]$ . TEST
SET: Sat Jul 9 18:31:28 PDT 2005
[tora@ tora2]$ echo $HOME
/home/data/ -> expected
[tora2@ tora2]$

[tora2@ tora2]$ ./TEST
SET: Sat Jul 9 18:33:43 PDT 2005
[tora2@ tora2]$ echo $HOME
/home/tora2 -> ?
[tora2@ tora2]$

USING TELNET:

[tora2@ tora2]$ . TEST
SET: Sat Jul 9 18:38:21 PDT 2005
[tora2@ tora2]$ echo $HOME
/home/data/
[tora2@ tora2]$


[tora2@ tora2]$ ./TEST
SET: Sat Jul 9 18:39:48 PDT 2005
[tora2@ tora2]$ echo $HOME
/home/tora2
[tora2@ tora2]$


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top