Ruby Development Quick Tip - Use the Ssh-forever Gem - Stop Typing Your SSH Passwords


Programming in Ruby tutorials and examples

Ruby Development Quick Tip - Use the Ssh-forever Gem - Stop Typing Your SSH Passwords


I just wanted to share a quick tip. A friend of mine asked why when using SSH does it not ask me for my password.

The quick answer is I use the ssh-forever gem.

By using this gem you only have to input your SSH passwords once and then they will be remembered for all future SSH connections (which is great when using deployment tools like capistrano or vlad - as you don’t want to keep entering your password everytime you deploy).

Firstly install the gem.

1
2
3
4
 (if you are using rvm - install it in the global gemset)
 rvm use gemset global

 gem install ssh-forever

Then its as simple as

1
 ssh-forever root@myserver.net 

You will be prompted to enter you SSH password for the last time. Future connections made will not require a password when connecting from your machine.

Comments