Re: Is this expected ssh behavior?
Rob Browning <rlb@cs.utexas.edu> wrote:
>
>As am I. It runs them just fine if I just do "ssh somehost". But if
>I do "ssh somehost bash -c umask", I can tell that it hasn't run my
>startup scripts. Further "ssh somehost bash" doesn't even give a
>prompt. Ahh, now the pieces begin to fall into place...
>
>I just noticed that "ssh somehost bash -i" *does* give me a prompt,
>and that "ssh somehost bash -i -c umask" indicates that the scripts
>are being run. However, the $PATH I get with "ssh somehost bash -i"
>indicates that although it's sourcing my ~/.bash* scripts, it's not
>reading /etc/profile.
`ssh host` allocates a tty, and so the shell you get is interactive.
`ssh host command` does not allocate a tty, so the shell is not
interactive and therefore won't source .bash files. `ssh -t host
command` allocates a tty, overriding this behaviour.
sshd does not create a login shell.
`man sshd` is your friend.
Tony.
--
F.A.N.Finch dot@dotat.at fanf@demon.net +44-7970-401-426
genes <=> memes proteins <=> algorithms amino acids <=> machine code
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: