Tuesday, 6 March 2012

My Top 5 SSH Commands

SSH(Secure Shell) is a network protocol for secure data communication, unlike Telnet SSH connects via a secure channel over an insecure network.
This means that data sent over SSH is encrypted.
Below I have added some useful commands for using SSH, Have Fun :)

ssh -t reachable_pc ssh unreachable_pc

I've had the problem where I need to connect to my PC at work, unfortunately
the ip address is unreachable, but it is reachable from the server at work.
Operation SSH man-in-the-middle is in effect!

ssh user@host cat /path/to/a/text/file | xclip

This is good for copying a file to your work machine and having it sit
in your X11 buffer (clipboard) so then just right click and paste contents of the file

ssh-copy-id user@host

This is very handy if you need to connect to a large number of hosts
it copys the SSH keys thus giving you password-less logins :D!

dd if=/dev/dsp | ssh -c arcfour -C username@host dd of=/dev/dsp

This is a strange one but kinda fun, I found this through google so its not mine
this will output the sound from you microphone to a remote computers speakers via SSH
funky eh?!

ssh -N -L2005:localhost:80 remotehost

One of the best things about SSH is Tunnelling, with the above command you can
view a remote hosts current website by going to http://localhost:2005

No comments:

Post a Comment