Sunday, April 29, 2012

FTP

Basics commands:

ftp -- To connect to the server

cd --           To reach to required directory on the server.
lcd  --         To reach to required directory on the local machine.
prompt --    Turns iteractive mode on or off so that commands on multiple files are executed without user
                    confirmation.
ascii --         To copy tex files use ascii mode.
binary --      To copy non text files like image or binaries etc use binary mode.
get --           To download file from the server.
mget  * --    To download files from the server through wild characters.
put  --          To upload file to the server.
mput * --     To upload file to the server through wild characters.
mdelete * -- To delete file from the server.
ls --             To list the files in server directory.
!ls --            To list the files in local machine directory.
pwd --         To check the present working directory on server.
!pwd --        To check the present working directory on local machine.
bye --           To quit ftp connection.
quit --           To quit ftp connection.



To check whether ftp status:
 
$sudo service --status-all | grep ftp
output: proftpd is stopped

To start ftp:
$sudo service proftpd start

To see the status of the ftpd
$sudo service proftpd status

To allow ftp sever connections:
$modprobe ip_conntrack_ftp 
 


Referernce:
http://www.cyberciti.biz/faq/iptables-passive-ftp-is-not-working/
http://www.thegeekstuff.com/2010/06/ftp-sftp-tutorial/
http://www.indianwebportal.com/block-ftp-access-firewall



Monday, April 23, 2012

ssh


SSH Escape Sequence:
Supported escape sequences:
~ . ----- terminate connection that got hanged
~ ^ Z -----suspend ssh --- to send the ssh-connection to background
~ #  ----- list forwarded connections
~ &  ----- background ssh (when waiting for connections to terminate)
~ ?  ----- this message
~ ~  ----- send the escape character by typing it twice
(Note that escapes are only recognized immediately after a newline.)


References:
http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/internet/node30.html