Closed GoogleCodeExporter closed 9 years ago
When ssh connects, it doesn't run the login shell. From the documentation: "If
command is specified, it is executed on the remote host instead of a login
shell."
If you run the same command manually with ssh, I presume you'll have the same
errors, right? With each shell, there are certain config files (like .bashrc
or .zshenv) that are run for every instance of the shell, and other files (like
.bash_profile or .zshrc) that are only run for login shells. I don't think
this is something that can change in pssh because it should try to keep the
same behavior as a straight ssh whenever possible.
Of course, if pssh is behaving differently than ssh, then I take it all back. :)
Original comment by amcna...@gmail.com
on 1 Jul 2011 at 3:22
Oh, I see. I didn't realize you could run commands just using ssh. You're
right (surprise, surprise... =) ). When I said, "ssh sources a .*shrc file," I
meant when I log on to a machine through ssh. Oops. But that's why I left the
"may or may not be desirable to fix" bit, as I figured there might be something
I didn't know.
So, ignore this bug. PEBKAC. But as an aside, is there a place I could put
path variable exports and have them run by ssh and pssh without needing a login
shell?
Original comment by mgard...@google.com
on 1 Jul 2011 at 3:30
You could either set things for your shell (such as bash or zsh) as I mentioned
in comment #1. Alternatively, ssh has some things like ~/.ssh/environment and
~/.ssh/rc that you could look into.
Original comment by amcna...@gmail.com
on 1 Jul 2011 at 6:16
Original issue reported on code.google.com by
drai...@gmail.com
on 1 Jul 2011 at 2:11