Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: ERRATA : interactive and login shells: bug or design decision ?

Subject: Re: ERRATA : interactive and login shells: bug or design decision ?
Date: Thu, 24 Mar 2005 09:53:41 -0800
On Thu, 24 Mar 2005 14:44:42 +0100, Cristian Zoicas
<zoicas@ictp.trieste.it> wrote:
Hello all

It seems that I have to correct my post on this mailing list.

When I execute: <ssh user@somesite.com>,  I get a login shell, but
when I execute: <ssh user@somesite.com command>, command does not run
       under a login shell.

Of course I do not expect the shell started in the second command to be an
interactive one, but I am expecting my command to run under a login shell.

The ssh version that I use is OpenSSH_3.6.1p2

The question is the same: Is this behaviour a bug or a design decision ?
If it is a design decision, then what are the reasons to have it like this.


Every SSH implementation that I have used (even SSHv1) did it this way.
Basically when you pass it a command, it uses the system() call.

If you want your environment initialized, you needed to do it explicitly:
$ ssh user@host.com '. /etc/profile;. $HOME/.profile;env'


-- 
END OF LINE
       -MCP

<Prev in Thread] Current Thread [Next in Thread>