Or, if you have restricted access for sftp only, I think you can still do this:
diff /path/to/localfile <(scp user@host:/path/to/remotefile >(cat))
Check if SSH tunnel is open and open it, if it isn't.
NB: In this example, 3333 would be your local port, 5432 the remote port (which is, afaik, usually used by PostgreSQL) and of course you should replace REMOTE_HOST with any valid IP or hostname. The example above let's you work on remote PostgreSQL databases from your local shell, like this:
psql -E -h localhost -p 3333
Run GUI apps on another machine remotely through SSH. -C is for data compression and -X enables X11 forwarding.
Forward connections to $HOSTNAME:8080 out to $HOST:80
Some servers don't have ssh-copy-id, this works in those cases. It will ask for the destination server, this can be IP, hostname, or user@hostname if different from current user. Ssh keygen will let you know if a pubkey already exists on your system and you can opt to not overwrite it.
Once it is connected to the remote server by that ssh protocol,the mentioned command will start working on that server.
It is an easy method unzip a file and copy it to remote machine. No unziped file on local hard drive Show Sample Output
Run this within a steady screen session. You can get the approximate time when the remote server went down or other abnormal behavior.
for passwordless login
This command will ask for remote sudo password before executing a remote command.
To start X11 display only on your local machine: xeyes & Extensions to basic command: ssh -X -f user@remotehost xcalc -bg black -fg green
One time you logged in, you can prove these method just writing "firefox".
waste the band width Show Sample Output
put down the joint and rtfm :)
This allows you to display the wireshark program running on remote pc to your local pc.
use .ssh file to login the server
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: