Re: interactive and login shells: bug or design decision ?
From: Greg Wooledge (wooledg_at_eeg.ccf.org)
Date: 03/24/05
- Previous message: Paul Stepowski: "sftp hangs on tru64 5.1A"
- In reply to: Cristian Zoicas: "interactive and login shells: bug or design decision ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 24 Mar 2005 07:54:46 -0500 To: Cristian Zoicas <zoicas@ictp.trieste.it>
On Wed, Mar 23, 2005 at 05:07:58PM +0100, Cristian Zoicas wrote:
> When ssh is started interactively, it starts a login shell, but when it is
> started in batch mode (e.g. ssh user@some.site.com command) it runs my
> command under an interactive shell.
It doesn't do that for me. From man bash:
An interactive shell is one started without non-option arguments and
without the -c option whose standard input and output are both con-
nected to terminals (as determined by isatty(3)), or one started with
the -i option. PS1 is set and $- includes i if bash is interactive,
allowing a shell script or a startup file to test this state.
And on my system:
imadev:~$ ssh localhost 'echo $-'
wooledg@localhost's password:
hBc
imadev:~$ ssh localhost 'echo $PS1'
wooledg@localhost's password:
(That's a blank line after the password prompt.)
> The ssh version that I use is OpenSSH_3.6.1p2
OpenSSH 3.9p1 for me, on HP-UX 10.20, with bash 2.05b.
- Previous message: Paul Stepowski: "sftp hangs on tru64 5.1A"
- In reply to: Cristian Zoicas: "interactive and login shells: bug or design decision ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|