Friday, November 6, 2009

Linux commands for remote access, compress, decompress

by Sandip Ransing 0 comments



Remote Login
============
ssh client is a program for logging into remote machine and execute commands.

ssh [-l login_name ] hostname | user@hostname [command ]

other options

ssh [-afgknqstvxACNTX1246 ] [-b bind_address ] [-c cipher_spec ] 
[-e escape_char ] [-i identity_file ] [-l login_name ] [-m mac_spec ] 
[-o option ] [-p port ] [-F configfile ] [-L port host hostport ] 
[-R port host hostport ] [-D port ] hostname | user@hostname [command ]

One can use putty for remote login through windows machine

Remote Copy
============
scp - secure copy (remote file copy program) that copies file between computers over network

scp source[ source file path] destination[user@funonrails.com:/home]

Other options

[-F ssh_config ] [-S program ] [-P port ] [-c cipher ] [-i identity_file ] 
[-o ssh_option ] [[user@ ] host1 : file1 ] [... ] [[user@ ] host2 : file2 ]

One can use pscp.exe for remote copy from windows machine

Compress
============
tar - is a package that allows you to compress direcory or file

tar czfv Test.tar.tgz Test/

Decompress
============
gzip - is a package that allows to extract compressed file/directories.

gzip -dc target.tar.tgz | tar xf -




blog comments powered by Disqus

About The Author

Sandip is a ruby on rails developer based in pune and also a blogger at funonrails. Opensource contributor and working with Josh software Private Limited. for more info read Follow Sandip on Twitter for updates.

Connect With Me...

Github Projects

@sandipransing Twitter