I presented the comethod stuff last night at the PUN. I pasted my examples on pastebin,
if you want to run it for yourself and see how things are working. I added some print statements
to help with that.
- dotfiles, a small python utility that can automatically symlink files in a so called repo (like .dotfiles) into your home directory. See: http://pypi.python.org/pypi/dotfiles. Basically I use this to quickly install or update remote environments so that wherever I log in I always have the same shell environment (I do this by syncing dot files on login once every hour through git/github).
Also if you want to take a look at my dotfiles, see: https://github.com/shanx/dotfiles. Far from complete but maybe nice to look at, more people should share their dotfiles :)
Muxing or connection sharing in SSH like a presented can be done by using the following lines in your .ssh/config file:
# Use ssh connection sharing (muxing)
# Keep connections open for one hour
This makes logging into a remote server multiple times very fast, since one connection is used. Also this connection is kept open when the last ssh client disconnects, so you can quickly reconnect afterwards. Two caveats though:
- Sometimes this can have unexpected behavior. Keep in mind that some state remains even after disconnecting. Updating my shell setting in /etc/passwd to bash instead of sh kept me logging into a sh session. This was because there was still an open connection.
- Jan Jaap explained also that he had some troubles with VPN connections using this trick.
I really enjoyed the last PUN! Thanks JJ and THA/Minddistrict.
Op 24-10-11 16:38, Remco Wendt schreef:
> Muxing or connection sharing in SSH like a presented can be done by
> using the following lines in your .ssh/config file:
> # Use ssh connection sharing (muxing)
> ControlMaster auto
> ControlPath /tmp/ssh_mux_%h_%p_%r
I am using that too since a few months and it is quite handy when you
are often logged in to the same server multiple time. If you have tab
completion set up correctly on your work machine 'scp user@server:TAB'
even uses that connection, making it much faster then when you only have
an authorized ssh key on the remote server.
> # Keep connections open for one hour
> ControlPersist 1h
According to a comment in my ~/.ssh/config I have tried this but it did
not work for me. (Mac OS X)