5 ms·
Even better: make the script work with local paths as well. Then you can put alias cd='sshcd' in your .bashrc, and you won't have to distinguish between
by kijin 13y ago
Even better: make the script work with local paths as well.
Then you can put
alias cd='sshcd'
in your .bashrc, and you won't have to distinguish between local and remote paths ever again.
- ChristianBundy 13y agoI was thinking about aliasing cd like that and instead having psuedo-directories that you can cd into to SSH into another box. The biggest problem though would be moving around in the box, as `cd ..` wouldn't take you back to your local machine. What do you think?
- crnixon 13y agoTake a look at https://github.com/spencertipping/cd https://github.com/spencertipping/cd. It will let you cd to local or remote machines the same way, and will take you back to your local machine on "cd ..". (It mounts the remote fs instead of SSHing there.)