"$d_SysMaint"'internet & wifi/ftp notes.txt' www.BillHowell.ca 22Jan2018 initial man ftp at end of this file USE FileZilla!!!! NUTS!!! ftp doesn't work in passive mode -can't do "ls" and "dir" use sftp - secure ******************* 22Jan2018 Google search "ftp client build 2018 and Linux Mint Debian Edition" https://ftp.gnu.org/ **************************** 22Jan2018 FireFTP not working with FireFox update - transfer portraits to WCCI2018 web-page -g Disables file name globbing. -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. cd remote-directory Change the working directory on the remote machine to remote-directory. cdup Change the remote machine working directory to the parent of the current remote machine working directory. close Terminate the FTP session with the remote server, and return to the command interpreter. Any defined macros are erased. 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. exit get remote-file [local-file] Retrieve the remote-file and store it on the local machine. If the local file name is not speci‐ fied, it is given the same name it has on the remote machine, subject to alteration by the cur‐ rent case, ntrans, and nmap settings. The current settings for type, form, mode, and structure are used while transferring the file. glob Toggle filename expansion for mdelete, mget and mput. If globbing is turned off with glob, the file name arguments are taken literally and not expanded. Globbing for mput is done as in csh(1). For mdelete and mget, each remote file name is expanded separately on the remote machine and the lists are not merged. Expansion of a directory name is likely to be different from expansion of the name of an ordinary file: the exact result depends on the foreign operating sys‐ tem and ftp server, and can be previewed by doing ‘mls remote-files -’ Note: mget and mput are not meant to transfer entire directory subtrees of files. That can be done by transferring a tar(1) archive of the subtree (in binary mode). lcd [directory] Change the working directory on the local machine. If no directory is specified, the user's home directory is used. ls [remote-directory] [local-file] Print a listing of the contents of a directory on the remote machine. The listing includes any system-dependent information that the server chooses to include; for example, most UNIX systems will produce output from the command ‘ls -l’. (See also nlist.) If remote-directory is left unspecified, the current working directory is used. If interactive prompting is on, ftp will prompt the user to verify that the last argument is indeed the target local file for receiving ls output. If no local file is specified, or if local-file is ‘-’, the output is sent to the termi‐ open host [port] Establish a connection to the specified host FTP server. An optional port number may be sup‐ plied, in which case, ftp will attempt to contact an FTP server at that port. If the auto-login option is on (default), ftp will also attempt to automatically log the user in to the FTP server (see below). put local-file [remote-file] Store a local file on the remote machine. If remote-file is left unspecified, the local file name is used after processing according to any ntrans or nmap settings in naming the remote file. File transfer uses the current settings for type, format, mode, and structure. rename [from] [to] Rename the file from on the remote machine, to the file to. user user-name [password] [account] Identify yourself to the remote FTP server. If the password is not specified and the server requires it, ftp will prompt the user for it (after disabling local echo). If an account field is not specified, and the FTP server requires it, the user will be prompted for it. If an account field is specified, an account command will be relayed to the remote server after the login sequence is completed if the remote server did not require it for logging in. Unless ftp is invoked with “auto-login” disabled, this process is done automatically on initial connection to the FTP server. . FILE TRANSFER PARAMETERS The FTP specification specifies many parameters which may affect a file transfer. The type may be one of “ascii”, “image” (binary), “ebcdic”, and “local byte size” (for PDP-10's and PDP-20's mostly). Ftp supports the ascii and image types of file transfer, plus local byte size 8 for tenex mode transfers. Ftp supports only the default values for the remaining file transfer parameters: mode, form, and struct. . # example : $ ftp [-46pinegvd] [host [port]] $ cd "/media/bill/HOWELL_BASE/Website/Neural nets/2018 WCCI Rio de Janeiro/" $ ftp [-46ngvd] /billhowell.ca +-----+ search 'Linux and ftp error "host: bad port number-- "' >> nyet https://www.lifewire.com/uses-of-linux-command-ftp-2201101 +-----+ $ ftp -46ngvd www.billhowell.ca ?Invalid command $ ftp -46ngvd billhowell.ca ?Invalid command $ ftp >> OK - same command line for ftp as I have been using +---+ https://www.lexicom.ca/ftpsftp-access-information/ Port Number. You do not need to specify the port number for FTP. For SFTP, use port 1022. +---+ ftp> open host www.billhowell.ca host: bad port number-- www.billhowell.ca usage: open host-name [port] >> wrong command ftp> open www.billhowell.ca Name (www.billhowell.ca:bill): bill 331 Password required for bill Password: 530 Login incorrect. Login failed. Remote system type is UNIX. Using binary mode to transfer files. ftp> open www.billhowell.cahttps://ftp.gnu.org/ Already connected to billhowell.ca, use close first. >> OOPS - I gave wrong username ftp> user billhowellweb ftp> open www.billhowell.ca Already connected to billhowell.ca, use close first. ftp> pwd 530 Please login with USER and PASS ftp> user billhowellweb ad91019a 331 Password required for billhowellweb 230 User billhowellweb logged in Remote system type is UNIX. Using binary mode to transfer files. >> GREAT!! finally I'm in! ftp> pwd 257 "/" is the current directory ftp> ls / https://superuser.com/questions/1148153/ftp-ls-dir-command-does-not-work-properly-on-linux-terminal-while-connecting-a-r/1267813 I had this same problem a while ago and although I wasn't connected via a guest account - I still got no data returned when issuing commands like dir or ls. The problem here sounds like the FTP client you're using is in active mode - which is the default. You should switch to passive mode instead by establishing the FTP connection then typing passive. You should get a confirmation message that passive mode has been turned on. Then enter in your ls or dir commands. Explanation: When you start up FTP it comprises two different connections - one for the commands(the command connection) and one for the data transferred(the data connection). When you are in active mode, the command connection is established on a server port. However, the data connection is left up to the server to establish. The server then connects to your machine on port 20 for that connection. The problem with this is that since attacks and hacking are more common these days than when FTP was invented, data sent by an outside source(the server) to port 20 on your machine will be blocked by your firewall, NAT, or other security software. When you use passive mode, the client gets to be in charge of establishing the data connection. It chooses a random port on the server to do so and then makes the connection. This shouldn't be blocked by the server or any firewall or security software. For a more detailed explanation, see here: http://www.jscape.com/blog/bid/80512/Active-v-s-Passive-FTP-Simplified answered Nov 13 '17 at 5:10, Alexander Wintschel ftp> mode passive We only support stream mode, sorry. ftp> cd "Neural nets/2018 WCCI Rio de Janeiro" 550 Neural nets/2018 WCCI Rio de Janeiro: No such file or directhttps://ftp.gnu.org/ory FTP isn't good enough in just active mode I need a better alternative ftp> ls -1 ftp> binary ftp> put "Lee, Chang Shing.png" ftp> put "Lucas, Simon.png" ******************************** 22Jan2018 man ftp NAME ftp — Internet file transfer program SYNOPSIS ftp [-46pinegvd] [host [port]] pftp [-46inegvd] [host [port]] DESCRIPTION Ftp is the user interface to the Internet standard File Transfer Protocol. The program allows a user to transfer files to and from a remote network site. Options may be specified at the command line, or to the command interpreter. -4 Use only IPv4 to contact any host. -6 Use IPv6 only. -p Use passive mode for data transfers. Allows use of ftp in environments where a firewall prevents con‐ nections from the outside world back to the client machine. Requires that the ftp server support the PASV command. This is the default if invoked as pftp. -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. The client host and an optional port number with which ftp is to communicate may be specified on the command line. If this is done, ftp will immediately attempt to establish a connection to an FTP server on that host; otherwise, ftp will enter its command interpreter and await instructions from the user. When ftp is awaiting commands from the user the prompt ‘ftp>’ is provided to the user. The following commands are recognized by ftp: ! [command [args]] Invoke an interactive shell on the local machine. If there are arguments, the first is taken to be a command to execute directly, with the rest of the arguments as its arguments. $ macro-name [args] Execute the macro macro-name that was defined with the macdef command. Arguments are passed to the macro unglobbed. account [passwd] Supply a supplemental password required by a remote system for access to resources once a login has been successfully completed. If no argument is included, the user will be prompted for an account password in a non-echoing input mode. append local-file [remote-file] Append a local file to a file on the remote machine. If remote-file is left unspecified, the local file name is used in naming the remote file after being altered by any ntrans or nmap set‐ Manual page ftp(1) line 1 (press h for help or q to quit) ftp # enddoc