commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Useful to get network access to a machine behind shared IP NAT. Assumes you have an accessible jump host and physical console or drac/ilo/lom etc access to run the command.
Run the command on the host behind NAT then ssh connect to your jump host on port 2222. That connection to the jump host will be forwarded to the hidden machine.
Note: Some older versions of ssh do not acknowledge the bind address (0.0.0.0 in the example) and will only listen on the loopback address.
Simply makes it possible to launch any X application residing on sshhost through sshproxy and display it on your screen where ever you are.
This may be listed already but this command is useful to untar a specific directory to a different server.
Nice command for when you don't have scp available for whatever reason.
Works with binaries.
Record off the microphone on a remote computer and listen to it live through your speakers locally.
Run local scripts on remote server. "-T Disable pseudo-tty allocation"
host B (you) redirects a modem port (62220) to his local ssh.
host A is a remote machine (the ones that issues the ssh cmd).
once connected port 5497 is in listening mode on host B.
host B just do a
ssh 127.0.0.1 -p 5497 -l user
and reaches the remote host'ssh. This can be used also for vnc and so on.
1. SSH into a machine
2. Tunnels VNC port to your local computer ("-L 5900:localhost:5900")
3. Runs a single use vnc server ("x11vnc -safer -localhost -nopw -once -display :0")
4. Goes into the background ("-f")
5. Runs VNC viewer on the local computer connecting to the remote machine via the newly created SSH tunnel ("vinagre localhost:5900")
I frequently use this trick to send my terminal settings to HPUX and older RHEL systems. This is due to the fact that terminfo support for rxvt-unicode (my preferred terminal app) does not exist on many older Linux and Unices.
Install a basic FreeBSD system on a distant server. I use this to install FreeBSD on servers that can only boot a Linux rescue system. This sytem loads on ram when booted, so it is possible to install freely. You can even install on ZFS root !
Will return the SSH server key information for each host you have in your ~/.ssh/known_hosts file, including key size, key fingerprint, key IP address or domain name, and key type.
Create a persistent remote Proxy server through an SSH channel.
This command will copy command's output into your local clipboard
When using tcpdump, specify -U option to prevent buffering.
This version transfers gzipped data which is unzipped as it arrives at the remote host.
It is an easy method unzip a file and copy it to remote machine. No unziped file on local hard drive