Quick shortcut if you know the hostname and want to save yourself one step for looking up the IP address separately.
Play with the framerate option '-r' to scale back bandwidth usage. The '-s' option is the captured screan area, not the rescaled size. If you want to rescale add a second '-s' option after '-i :0'. Rescaling smaller will also decrease bandwidth.
Alternative for machines without ssh-copy-id
Oneliner to run commands on multiple servers over ssh. - First parameter "$1" is the command you want to execute remotely. ( It can be multiple commands e.g. "hostname;uptime") - Second parameter "${@:2}" represents the remote host/s you want to run the command/s on. Show Sample Output
It requires https://jqplay.org/, that comes with brew: brew install jq Show Sample Output
this will tar/send/untrar a whole directory.
--delete will delete copies on remote to match local if deleted on local --stats will output the results -z zip -a archive -A preserve ACL -x don't cross filesystem boundaries -h human readable -e specify the remote shell to use
Ping machine once, waiting 1 second for response until failing. Upon fail, ssh globally, otherwise ssh locally.
Creates a quick backup with tar to a remote host over ssh.
Foward vnc securely from exampleserver.com Show Sample Output
This command will copy files and directories from a remote machine to the local one.
Ensure you are in the local directory you want to populate with the remote files before running the command.
To copy a directory and it's contents, you could:
ssh user@host "(cd /path/to/a/directory ; tar cvf - ./targetdir)" | tar xvf -
This is especially useful on *nix'es that don't have 'scp' installed by default.
PRIVATEKEY - Of course the full path to the private key \n
HOST - The host where to get the backup \n
SOURCE - The directory you wish to backup \n
DESTINATION - The destination for the backup on your local machine
If the remote doesn't export its desktop (eg fluxbox, blackbox etc) then you need to run a x11vnc server there and a vncviewer at the local end. This command does the lot for you - it assumes that you can 'ssh' to the box without a password and that x11vnc is installed at the remote end.
this command test the moduli file generated by the command ssh-keygen -G /tmp/moduli-2048.candidates -b 2048 . The test can be long depend of your cpu power , around 5 minutes to 30 minutes
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: