setting environment for SSH and SCP session

From: Claus Østby Nielsen (cni_at_privat.dk)
Date: 04/25/04


Date: Sun, 25 Apr 2004 09:26:05 +0200

Can anyone point me to the docs that tell you how to set the
environment when you execute commands remotely via ssh?.

If I login using "ssh remotehost" then I get a reasonable environment,
probably comes from my .profile, however if I "ssh remotehost command"
then the environment that the command runs in is quite spartan.

What I need to know is how do I configure the environment in the
second case, specifically I need to add the usual */bin paths to the
PATH variable.

My default shell is '/bin/sh'



Relevant Pages

  • Ssh X11 forwarding not initialising
    ... Please can anyone tell me why when using Ssh on solaris when I ... remotehost" the DISPLAY variable is left blank and X11 forwarding ... If I run the ssh command in verbose mode I am missing the info line; ...
    (comp.security.ssh)
  • Custom ("Bootleg"?) Command Environments
    ... during the last year regarding a bootleg command environment. ... Jim brought a copy of Donald Slutz' personal replacement command ... So I could LOAD into one of my DTAR2 segment, ... dcl ioa$ entry options, ...
    (comp.sys.prime)
  • Re: Some personal linux observations
    ... One of my big bitches about the M$ environment is that the command line ... but open source developers are usually more interested in expressing ... installing software from sourcecode. ...
    (alt.os.linux)
  • Re: New "base document" available
    ... that will list the environment variables and 'set' is built into bash. ... or it may be from having something set in an EV or from a command ... The getparam program should do whatever is necessary on the particular ... then a configuration file, and then the environment or the registry. ...
    (comp.lang.cobol)
  • Re: New "base document" available
    ... How to go about retrieving command line parameters? ... the command line arguments (and environment variables) ... Keyword and positional parameters can be mixed in the same command line. ... clp-name points to a string containing "P1" ...
    (comp.lang.cobol)