Tag: ssh
Auto-reattaching terminal multiplexor with tabs
by mmnicolas on Oct.21, 2009, under gnu/linux
Typically, from a single ssh connection comes a single shell, let’s improve this situation.
We will use a terminal multiplexor GNU Screen, which provide multiple terminals. We will also implement a neat tab bar to allow naming/showing tabs and automatic session re-attachment capability.
Follow these steps to significantly enhance your distant shell experience, you will need to install screen and ssh, mutt and irssi are optional.
The first step involves using environment variables in order to detect if the login is locally originating or not. If the user is logging from a distant machine, we will reattach an existing detached screen session or create a new one.
When logging in remotely, the most evident distinction i’ve found between a local and remote shell is the environment variable SSH_CONNECTION=, with this var we have a way of detecting remote logins easily and launch something else accordingly.
Passwordless ssh login
by mmnicolas on Jun.22, 2009, under gnu/linux
Authenticating with regular mechanisms even with ssh always sends your password in clear text, using the RSAAuthentication requires you use a pair of files known as public/private key pair. You can use a passphrase on them for even more security (eg.: let’s say someone gets his hands on these files, without the passphrase there is still no chance to use the key) or use them without passphrase, resulting in a passwordless, automatic login, which is very nice but you have to take care of your precious keys.
Here’s how to generate your pair of keys: