w43L / blog: Automating FTP Logins

well this is something i learned recently and wanted to share it, so maybe it could be useful for someone in a far far place browsing this site which no one visits …

anyway enough BS, lets get into the title

have you ever felt so bored of repeating the same username/password combination to log into some ftp account on that server you keep uploading files to, well if you didn’t i did, and to be truthful i’ve also seen it in some script file on another server the line goes like this “ftp -i ser.ver.add.ress”,so i liked the way you can just type the IP address of the FTP server i you get instant access to it, now here’s how you could do it:

  1. what you need is : ftp server,linux machine, user-account on both machines
  2. on your linux machine (client) edit (or create if it does not exist) .netrc file in your home directory and put the following code:
  3. machine 1.2.3.4
    login user
    password thisIsAPassword

    where 1.2.3.4 is the ip address of the server and user is your username thisIsAPassword is your password

  4. now try typing ftp -i 1.2.3.4 and you should be logged in the ftp server (wow that was easy right)

hope you enjoyed it………….

later



all posts



2010
April
26Search flickr for Creative Commons content only
13Technologia
March
28Developing the web
17Now with youtu.be URLs
February
14FBps: no more proxies
January
29Be civil to all …
16Open source and politics
8All the systems suck


2009
December
30Get your old retweets back
23Enabling twitter integrated search in syria
November
22Announcing @mutweeps
September
10No more google reader
August
22Ramadan Kareem
March
26MySQL Workbench OSS 5.1.9
26General Index Strategies
February
22Automating FTP Logins
9Kaspersky Customer Database Exposed


2008
December
22Life…
October
10my new secret project
6The New look
June
29The Art of Blocking
21google 404 or 403
19just another reason to move to python
19Charging Lines
3my first python script
May
28Get Your IQ Rank
12Time to Change !
April
9Network
1Star Wars via telnet
1Revolution OS
February
6good code & bad code
6Microsoft & Yahoo!
January
23Microsoft knows better

subscribe