[openssh] What env variables does scp set on remote?

From: Harry Putnam (reader@newsguy.com)
Date: 07/15/02


From: Harry Putnam <reader@newsguy.com>
Date: Sun, 14 Jul 2002 15:09:06 -0700

When ssh connects to a remote machine it sets a handy variable, SSH_TTY.
Tests against that variable can be used to control things in init
files that need to act different when its ssh as against a console
login.

In home experiements it appears that scp does not set that var, and
therefore it cannot be used to control stuff that might not be good
in a scp connection, so cutting to the chase, I wondered what env
variables if any scp sets on connection, that might be available for
the same kind of usage?

scp -vv [...]
doesn't appear to supply that information.
ditto man scp|grep env



Relevant Pages

  • Re: Is SSH worth it??
    ... > We would be using SSH and SCP. ... SCP for automated scripts. ... > client will not be prompted for a password. ... remote machine, but imho it is better to swap client+server and give ...
    (Security-Basics)
  • RE: SCP and MVS data sets?
    ... SCP and MVS data sets? ... Is it possible that the open function is different in SCP? ... You can also do the following weirdness to use ssh to copy a z/OS legacy ...
    (bit.listserv.ibm-main)
  • Re: linux to linux scp in batch mode: how?
    ... reason why it works now is because of the dsa key. ... > been configured automatically when I set up ssh, I would imagine that I am ... >> I have ssh and scp up and running on my two Redhat 7.2 Linux machines, ... >> between the machines. ...
    (comp.security.ssh)
  • Re: linux to linux scp in batch mode: how?
    ... And now I can log on via ssh or scp without being prompted for the password. ... I am not specifically using ssh-agent, ... > between the machines. ...
    (comp.security.ssh)
  • RES: Is SSH worth it??
    ... attacker would have root access to another machines in your network. ... When I needed automated scripting using ssh and scp I used this programming ... SCP for automated scripts. ...
    (Security-Basics)