Difference between revisions of "Connecting to FTP"

From Hostek.com Wiki
Jump to: navigation, search
(Connecting Using an FTP Client)
(Connecting Using a Browser)
Line 17: Line 17:
 
Any browser nowadays has FTP functionality, but it tends to be limited. Nevertheless, to connect using your browser, you will want to do the following.
 
Any browser nowadays has FTP functionality, but it tends to be limited. Nevertheless, to connect using your browser, you will want to do the following.
 
#Open your browser
 
#Open your browser
#Type ftp://yourdomain.com into the URL box at the top
+
#Type ftp://ftpusername:ftppassword@yourdomain.com into the URL box at the top
#Hit enter. This will open up a dialog box asking for your username and password
+
#*''Note: typing ftp://domain.com will not prompt for a login''
#Type your credentials in the box
+
 
#Once authenticated you will see a list of the files in the default directory of your site
 
#Once authenticated you will see a list of the files in the default directory of your site
  

Revision as of 16:08, 19 December 2014

Types of FTP connections

There are three main types of FTP connections. That is using an FTP client, using your browser, and using the command prompt or shell script.

Connecting Using an FTP Client

An FTP client is a desktop program that does all of the heavy lifting involved with connecting and maintaining an FTP connection to a server. Most FTP clients have an FTP log on the top screen, a local file menu, and a remote file menu.

To connect to FTP Clients such as FileZilla and CuteFTP:

  1. Login to WCP to get your FTP Account information. (To learn more about WCP click Here)
  2. Open up the FTP Client
  3. In the Host box, type something like ftp.yourdomain.com or your site IP
  4. In the username box, type the username you grabbed from WCP or cPanel
  5. In the password box, copy the password you made
  6. (optional) In the port box, type in 21
  7. Click Connect

Connecting Using a Browser

Any browser nowadays has FTP functionality, but it tends to be limited. Nevertheless, to connect using your browser, you will want to do the following.

  1. Open your browser
  2. Type ftp://ftpusername:ftppassword@yourdomain.com into the URL box at the top
  3. Once authenticated you will see a list of the files in the default directory of your site

Connecting Using Command Prompt

  1. Search your computer for cmd.exe
  2. Run ftp yourdomain.com
  3. This will then promt you to enter in the username and password
  4. Once in, you will be able to use FTP commands to move and change files. Below is a list of available commands (Note: This is not complete)

ABOR – abort a file transfer
CWD – change working directory
DELE – delete a remote file
LIST – list remote files
MDTM – return the modification time of a file
MKD – make a remote directory
NLST – name list of remote directory
PASS – send password
PASV – enter passive mode
PORT – open a data port
PWD – print working directory
QUIT – terminate the connection
RETR – retrieve a remote file
RMD – remove a remote directory
RNFR – rename from
RNTO – rename to
SITE – site-specific commands
SIZE – return the size of a file
STOR – store a file on the remote host
TYPE – set transfer type
USER – send username

Connecting Using Linux

  1. Open your command lines tool
  2. Run ftp yourserver.com
  3. Type in your username and password in the prompt that follows
  4. Once in, use the below commands to move and edit files. (Note: this is not complete)

-p
Use passive mode for data transfers. Allows use of ftp in environments where a firewall prevents connections from the outside world back to the client machine. Requires that the ftp server support the PASV command. This is the default now for all clients (ftp and pftp) due to security concerns using the PORT transfer mode. The flag is kept for compatibility only and has no effect anymore.
-i
Turns off interactive prompting during multiple file transfers.
-n
Restrains ftp from attempting auto-login upon initial connection. If auto-login is enabled, ftp will check the .netrc (see netrc(5)) file in the user's home directory for an entry describing an account on the remote machine. If no entry exists, ftp will prompt for the remote machine login name (default is the user identity on the local machine), and, if necessary, prompt for a password and an account with which to login.
-e
Disables command editing and history support, if it was compiled into the ftp executable. Otherwise, does nothing.
-g
Disables file name globbing.
-v
Verbose option forces ftp to show all responses from the remote server, as well as report on data transfer statistics.
-d
Enables debugging.
bye
Terminate the FTP session with the remote server and exit ftp An end of file will also terminate the session and exit.
cd remote-directory
Change the working directory on the remote machine to remote-directory
delete remote-file
Delete the file remote-file on the remote machine.
dir [remote-directory ] [local-file ]
Print a listing of the directory contents in the directory, remote-directory and, optionally, placing the output in local-file If interactive prompting is on, ftp will prompt the user to verify that the last argument is indeed the target local file for receiving dir output. If no directory is specified, the current working directory on the remote machine is used. If no local file is specified, or local-file is -, output comes to the terminal.
get remote-file [local-file ]
Retrieve the remote-file and store it on the local machine. If the local file name is not specified, it is given the same name it has on the remote machine, subject to alteration by the current case ntrans and nmap settings. The current settings for type form mode and structure are used while transferring the file.