[ale] Question for UNIX/Linux gurus...

Zhongbin Yu " <zyu at premtec.com> Zhongbin Yu " <zyu at premtec.com>
Fri Jul 16 16:36:31 EDT 1999


I have an idea. You modified your remote .profile or .kshrc or alike on
before you rlogin, such that you will be cd to the local dirname
you are at upon a succesful login.

On local machine, you have a wrapper like this:
	localCWD=`pwd`
	rsh remoteHost updateProfile.sh $localCWD
	rlogin -l remoteHost

updateProfile.sh is a shell script on the remote host. It will take one
argument and change .profile to have 'cd $1'. The change can be done by a
appending to an template or parsing a template.

SSH would be a much safer alternative if you may. The scheme would be
similar though, I assume. ssh/scp.

Jerry Yu
----------------------------------------------------------------------------
Systems Engineer	| zyu at tc.net
Premiere Technologies	| 404-262-8544(O)	1-800-979-1105 (P)
Atlanta, GA 30326	| ae.tc.net/dept/engineering/op/public/developer/zyu

On Fri, 16 Jul 1999, Justin Russell wrote:

#I am trying to set up an alias that will rlogin to a remote machine and change directory to the exact
#
#directory I am on on my local machine.  Anyone know how to do this in sh or ksh?  I have the
#
#exact same directory structure (except $HOME) on both machines.  I have looked at the man pages
#
#on rlogin and telnet and I dont see any way to login to a machine and execute a command all in one command
#
#except with rsh, which logs out afterward.
#
#Any help appreciated,
#
#Justin
#
#/\/\/\/\/\/\/\/\/\/\/\/\/\//\/\/\/\/\/\
# Justin W. Russell
# Engineer, Aerodynamics/CFD
# Lockheed Martin Aeronautical Systems
# 86 South Cobb Drive
# Marietta, GA  30063-0685
#
# Tel:  (770) 494-6303
# Fax:  (770) 494-3055
#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
#
#
#






More information about the Ale mailing list