Operating System - Linux
1827990 Members
2638 Online
109973 Solutions
New Discussion

Unexpected messages when using ssh and rlogin

 
Tony Rossomano_2
Occasional Contributor

Unexpected messages when using ssh and rlogin

Hello, I'm getting some strange messages when using ssh and rlogin to remote login into our server. We have a simple network setup right now, with a Compaq Proliant Server running RedHat Advanced Server 2.1 and a few Compaq workstations running RedHat 8.0. We are using NIS to share user and host name information with the workstations(the only user created on the workstations is root, all other users are created on the server). When we use rlogin or ssh to remote login into the server(using a user other than root), we get these messages:

root: command not found
root: Undefined variable

The remote login works fine, but we have these messages.
I also have a question about user environments. When we remote login via ssh or rlogin does the user's environment get setup? i.e. does the .cshrc get executed? For example, our users use the c-shell. So, when we remote login, should we have history and all the other common features of the shell environment? Oh, and could those messages have anything to do with the fact that rlogin and ssh are suid root?
Any help would be greatly appreciated. I would really like to get rid of those messages!!

Thanks,

Tony
4 REPLIES 4
V.Tamilvanan
Honored Contributor

Re: Unexpected messages when using ssh and rlogin

Hi,
Yes.When we remote login via ssh or rlogin the user's environment get setup.
If the default remote shell is csh, csh sources the remote .cshrc file before the command. remsh cannot be
used to run commands that require a terminal interface like vi, more.
So you need to check up the environment settings for your errors.

HTH
Steven E. Protter
Exalted Contributor

Re: Unexpected messages when using ssh and rlogin

To clarify further, every command must be run on the login with its full path name

The script you are using hasn't been fully tested.

vi becomes
/usr/share/locale/vi

tar becomes
/usr/lib/vfs/extfs/tar

etc

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Caesar_3
Esteemed Contributor

Re: Unexpected messages when using ssh and rlogin

Hello!

You probably have problem with your .cshrc
check it to find the lines that belong
to the errors then you will understand the problem.

With the remote connection you have all the
user enviroment, you can see that because
that you have those errors, because it's
load your enviroment.

On the system you will find that a lot of
programs have suid, without this they could
not work or work only for root.

Caesar

PS.
You can also check the .login file.
Bill Douglass
Esteemed Contributor

Re: Unexpected messages when using ssh and rlogin

Try adding

echo

to the .cshrc of the user you are logging in as.

This will display each command line as it is being executed, and should make it easier to find the offending command(s).