Everything that is executed on the command line, including scripts, will not need the SSH key password to run SSH commands. Keychain asks me for my SSH key password when I start my Terminal and then stores it until I reboot the machine. (Don’t confuse it with the built in Keychain feature in Mac OS X.) The link goes to the “Introduction to Keychain” page where have everything you need to get it up and running. The one I have used for many years is Keychain. Luckily there are a number of SSH key management solutions (front ends to ssh-agent) that combines security with convenience. I am not comfortable with this solution! It’s to easy to loos ones laptop/USB stick, or what you keep your private key on, and with no SSH key password there is an open road to all your servers.įor me strong passwords are a must on SSH keys, like everywhere else. Many instructions for SSH keys recommend giving the private key an empty password, as this one from an O’Reilly book Quick Logins with ssh Client Keys.Īn empty password is convenient, you can log in without any password, use ssh commands in scripts that runs unattended etc. I routinely disable password authentication and only allow SSH keys on my own server. SSH keys is a convenient and secure way to log in to a remote server. Let Keychain handle your SSH keys - easy and secure # append to the history file, don't overwrite itĢ. # Make history work well with multiple shells Now you have a truly useful Bash command line history at your service.Īdd the following to your ~/.bashrc file to make the magic happen: # Settings for history function Then lets extend the history to something like the last 50000 commands, make it ignore duplicated and some common short aliases/commands and lastly make it work with multiple shells. Say you type “drush”, if you then hit the up arrow you will automatically search the history for commands starting with “drush”. The result is that pressing the up arrow will work just as normal unless you have start typing something. There is a simple way to make the history search function also work via the up/down arrows. By default only the last 500 commands are in the history and you search it with “ctrl+R”. The most common use is to scroll back through your command history via the up/down arrows. Nothing saves me time and frustration like a properly configured Bash command line history. The Bash command line history at your service Windows users could try with Cygwin but it’s a lot easier to just get with the time and switch OS. Ubuntu users, and most other Linux distributions, should have no problems using the tips. If there are any differences between them I will mark it out. I’m using Debian GNU/Linux 5 Lenny and Mac OS X 10.6 Snow Leopard. Here follow my best tips for making the command line a pleasant place to get work done. I want good tools that are adapted to the way I like to work. I have something of a passion/obsession with removing annoying obstacles in my every day tasks. If you are not then I recommend the video from Addison Berry session “ The command line is your friend” from DrupalCon Copenhagen 2010. This post assumes that you are familiar with the unix command line.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |