Quick Tip: SSH Backspace
August 26th, 2008
I just ran across this informative post by Jonathan Tron that solved an annoyance I’ve had for a while: backspace not doing what I want when I use SSH.
Change your Terminal Preferences
- In Terminal, select Preferences | Settings | Advanced.
- Select ‘Delete sends Ctrl-H’
You may need to do this again if you change your terminal style.
Specify a setting for nano
- On your server open ~/.nanorc
- Add ‘set rebinddelete’
And now you should have backspace working correctly for at least a few things…
Quick Tip: Capistrano SSH Ports
August 24th, 2008
If you have changed the SSH port number on your server, then you need to let Capistrano know how to connect. Luckily, it’s pretty easy.
Add the following to your deployment file, replacing 8888 with your port number.
config/deploy.rb
ssh_options[:port] = 8888
This will apply that port number to connections made by Capistrano. If you need to specify the port for each server (app, web, db) then tack it on to the end of their declarations.
role :app, "65.74.169.199:8030"
role :web, "65.74.169.199:8031"
role :db, "65.74.169.199:8032", :primary => true
I haven’t verified that one, but it supposedly works. Happy deployments!
Quick Tip: SSH Config
August 22nd, 2008
It’s easy to create shortcuts for all those servers you need to SSH into. There should be a file in your .ssh directory called config. Simply add a few lines to this file and you can refer to those servers by their short name.
Example (~/.ssh/config)
Host foo
Hostname some.long.hostname.you.cannot.remember.com
User myuser
Port 1234
Now you can use your new host when you SSH.
ssh foo
If you want to get even fancier, read the man page for additional options.
man ssh_config
Setup as many as you need and free yourself from SSH hostname hell!