login to your remote server using cd and rvmrc

Here is a fun trick which you can use, to simulate that a remote server is on one of your directories.

Create a folder call ~/m/example.com and in that folder create a file called .rvmrc with the following command


ssh awesomeuser@example.com -p 2302 -i ~/.ssh/awesomekey_rsa
#or whatever ssh command you use

Now whenever you run cd ~/m/example.com you will automagically be logged into your remote computer.

Obviously, this is a fun trick. All this can be done in a much nicer way using the ~/.ssh/config file.

Here are a few resources to make your ssh config more useful, allowing you to login to servers using a command like ssh myserver

I wonder what other stuff could be done using rvmrc.

I am currently working on LiveForm which makes setting up contact forms on your website a breeze.