Reattaching remote servers: no such file or directory in terminal

mountNetworkremote desktopterminal

I'm using the Connect to Server tool to mount a remote drive. I'm able to access this via Terminal at /Volumes/REMOTE. If I unmount and remount the same connection however, my existing terminal windows can't reconnect — I have to open new terminal windows. Is there any way around this behavior?

e.g.

$ cd /Volumes/REMOTE
$ ls
Desktop    envs    intel    
<un-mount>
<re-mount>
$ pwd
/Volumes/REMOTE
$ ls
ls: .: No such file or directory

If I have an emacs session open with a remote file, and the connection is lost and reconnected (un-mounted, and re-mounted), the session still works fine.

Best Answer

As of El Capitan, OSX 10.11.0, this is no longer an issue. Terminal is now able to recover once the remote server has been remounted.