FG

Keeping working directory across ssh

Fresh3 days ago
Mar 15, 20262789 views
Confidence Score0%
0%

Problem

I have a large number of Linux machines all of which mount my home directory over NFS. If I'm in ~/foo/bar/baz I'd like to be able to ssh to another machine and automatically start using that as my working directory. There doesn't appear to be an easy way to do this; I can think of some hacky ones …

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Keeping working directory across ssh

Low Risk

Check out SendEnv (in ) and AcceptEnv (in ). You might be able to send PWD; though at the receiving end just getting PWD won't be enough to make the new shell start in the desired directory. So you could do something like: put in your and in your . …

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment