Subscribe to RSS feed

«

»

Aug
15

SSH Tips and Tricks

Here you are, you SSH to connect to and manage remote machines. I already covered how to make it easy for you to connect to servers without needing a login. But what about some more advanced things SSH can do? Well here is a list of common things I do using SSH.

1. Open remote GUI applications on my local desktop. What you say? You can do that? Yes you can, say open the network manager on your server to add an IP, or open the services manager to enable and start MySQL. You can do all of that through the comfort of your own desktop. Just connect via SSH with the -X command and run a GUI command.

ssh -X server1
firefox

This will open an instance of firefox on the remote server and bring the window onto your desktop. Simply close the window and your prompt returns to you. But be careful, if you run something that is resource intensive it will take up CPU cycles on the remote server and not your computer. Try it with configuration tools, in RedHat and CentOS system-config-network or system-config-services.

2. You can tunnel any protocol over SSH using -D port# option. So let’s say you are at one of those hacker conferences and you are on a shared wireless connection with everyone else and you need to check your email. Of course your running secure IMAP right? Well if you are still POPing your mail other people could sniff your traffic to see the XOXOXO’s your significant other has sent you. This is where SSH comes into play. Establish an SSH session to your server specifying the -D option and port 25 like so.

ssh server1 -D 110

Now as long as the IP for server1 is the same as the server configured in your POP client then traffic to the server will go over your SSH tunnel. Cool huh? You could do the same thing with webmail running on the standard web port 80. Or you could even setup Squid (part of Apache) and use it as a proxy for your web browser that is completely encrypted.

4 comments

  1. Stilts says:

    Heya…

    Looking for something else, but very nice site….

  2. LocalAdLink says:

    Hi…

    Looking for something else, but cool site….

  3. Personal Injury says:

    just meandered in….

    Looking for something else, but very fine site. All the best….

  4. Trikke says:

    Heya…

    Very nice site. All the best….

Leave a Reply

  • Facebook
  • Picasa