Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Mosh doesn't read the right shell profiles (I think) #182
Comments
|
Hello Peeja, ssh doesn't remotely execute commands under an interactive shell, so to the best of my knowledge neither The easiest solution here is to use a --server= option to give the full path to the mosh-server on the remote machine. You can make a shell alias to save typing. |
keithw
closed this
Apr 16, 2012
Peeja
commented
Apr 16, 2012
|
The It seems a little weird that I should have to know the full path to the mosh-server on a remote machine, doesn't it? I don't need to know where ssh is installed. |
That's because the SSH daemon is already running (as root) and listening on a well-known port. By contrast the This is an important architectural decision. It delegates a lot of the security-critical complexity (authentication and public-key crypto) to the existing trusted SSH infrastructure. It also makes Mosh usable without admin privileges on either end. Actually, sometimes SSH isn't running on that well-known port 22. In that case you do need to tell |
Peeja
commented
Apr 17, 2012
|
Right, I understand what's going on technically, it just seems like an odd design choice—not bootstrapping over SSH, but requiring the the client to know the disk location of the Here's my exact case. I'm connecting between two OS X machines,
So if I install with Homebrew, I either have to manually symlink into, say, |
Or you can set
This is the problem; it's not the case that every shell is a child of a login shell. When you remotely execute a command (i.e. Personally, my
so I get the same environment whether or not bash is a login shell.
It's not a design choice, and that's not what we require. :) It's just what happens when you execute commands remotely over We could definitely improve the documentation and error messages surrounding this issue, though. |
Peeja
commented
Apr 17, 2012
|
Okay, so if I'm reading you right, I was incorrect in thinking that the Thanks for taking the time to dig in with me. |
scentoni
commented
Dec 2, 2013
|
I was having a similar problem, so I tried setting
yet
Can you explain this? I am able to connect using |
Peeja commentedApr 15, 2012
I've never understood for sure which files (
.bashrc,.bash_profile, etc.) get which bits of shell config. I know what causes each to be sourced (interactive shell, login shell, etc), I'm just not sure I understand what settings ought to be run when. So I may have mine set up wrong.I have my
PATHset up in my.bash_profile. My theory is that this is correct because it's exported from here for subshells, and every shell should inherit its environment from a login shell.However, when I run
mosh me@mybox, I find that only the.bashrcruns, so there's noPATHset, and it can't findmosh-server.Am I missing something?