sftp
is the secure method for transferring files between computers. If security doesn't matter most of the commands used in this section can be used with ftp
. The format of the sftp
command is:
sftp hostname
Once connected to the remote machine, sftp
prompts for a login name and password on the remote. Some of the possible functions are:
bye
: End sessioncd remotedirectory
: Change the directory on the remote machineget filename
: Copy a file from remote machine to local machinehelp
: Print helplcd localdirectory
: Change the directory on the local machinels
: List files on the remote machinemget remotefiles
: Multiple get.mkdir remotedirectory
: Make a directory on the remote machinemput localfiles
: Puts multiple files on the remote machineput localfile
: Puts localfile on remote machinepwd
: Print working directory on remote machinequit
: Same as bye