|
|||||||||||||||||||||||||||||||||||
Part I Network Services Topics Part II Accessing Network File Systems Topics 4. Managing Network File Systems (Overview) 5. Network File System Administration (Tasks) 6. Accessing Network File Systems (Reference) 8. Planning and Enabling SLP (Tasks) 10. Incorporating Legacy Services Part V Serial Networking Topics 15. Solaris PPP 4.0 (Overview) 16. Planning for the PPP Link (Tasks) 17. Setting Up a Dial-up PPP Link (Tasks) 18. Setting Up a Leased-Line PPP Link (Tasks) 19. Setting Up PPP Authentication (Tasks) 20. Setting Up a PPPoE Tunnel (Tasks) 21. Fixing Common PPP Problems (Tasks) 22. Solaris PPP 4.0 (Reference) 23. Migrating From Asynchronous Solaris PPP to Solaris PPP 4.0 (Tasks) 25. Administering UUCP (Tasks) Part VI Working With Remote Systems Topics 27. Working With Remote Systems (Overview) 28. Administering the FTP Server (Tasks) 29. Accessing Remote Systems (Tasks) Accessing Remote Systems (Task Map) Logging In to a Remote System (rlogin) How to Search for and Remove .rhosts Files Logging In to a Remote System (ftp) How to Open an ftp Connection to a Remote System How to Copy Files Between a Local and a Remote System (rcp) Part VII Monitoring Network Services Topics |
Logging In to a Remote System (ftp)The ftp command opens the user interface to the Internet's File Transfer Protocol. This user interface, called the command interpreter, enables you to log in to a remote system and perform a variety of operations with its file system. The principal operations are summarized in the following table. The main benefit of ftp over rlogin and rcp is that ftp does not require the remote system to be running UNIX. The remote system does, however, need to be configured for TCP/IP communications. However, rlogin provides access to a richer set of file manipulation commands than ftp provides. Authentication for Remote Logins (ftp)Authentication for ftp remote login operations can be established by one of the following methods:
Essential ftp CommandsTable 29-3 Essential ftp Commands
For more information, see ftp(1). How to Open an ftp Connection to a Remote System
This ftp session was established by the user smith on the remote system pluto: $ ftp pluto Connected to pluto. 220 pluto FTP server ready. Name (pluto:smith): smith 331 Password required for smith: Password: password 230 User smith logged in. ftp> How to Close an ftp Connection to a Remote SystemClose an ftp connection to a remote system by using the bye command. ftp> bye 221-You have transferred 0 bytes in 0 files. 221-Total traffic for this sessions was 172 bytes in 0 transfers. 221-Thanks you for using the FTP service on spdev. 221 Goodbye. A goodbye message appears, followed by your usual shell prompt. How to Copy Files From a Remote System (ftp)
In this example, the user kryten opens an ftp connection to the system pluto, and uses the get command to copy a single file from the /tmp directory. $ cd $HOME ftp pluto Connected to pluto. 220 pluto FTP server (SunOS 5.8) ready. Name (pluto:kryten): kryten 331 Password required for kryten. Password: xxx 230 User kryten logged in. ftp> cd /tmp 250 CWD command successful. ftp> ls 200 PORT command successful. 150 ASCII data connection for /bin/ls (129.152.221.238,34344) (0 bytes). dtdbcache_:0 filea files ps_data speckeysd.lock 226 ASCII Transfer complete. 53 bytes received in 0.022 seconds (2.39 Kbytes/s) ftp> get filea 200 PORT command successful. 150 ASCII data connection for filea (129.152.221.238,34331) (0 bytes). 221 Goodbye. In this example, the same user kryten uses the mget command to copy a set of files from the /tmp directory to his home directory. Note that kryten can accept or reject individual files in the set. $ ftp> cd /tmp 250 CWD command successful. ftp> ls files 200 PORT command successful. 150 ASCII data connection for /bin/ls (129.152.221.238,34345) (0 bytes). fileb filec filed remote: files 21 bytes received in 0.015 seconds (1.36 Kbytes/s) ftp> cd files 250 CWD command successful. ftp> mget file* mget fileb? y 200 PORT command successful. 150 ASCII data connection for fileb (129.152.221.238,34347) (0 bytes). 226 ASCII Transfer complete. mget filec? y 200 PORT command successful. 150 ASCII data connection for filec (129.152.221.238,34348) (0 bytes). 226 ASCII Transfer complete. mget filed? y 200 PORT command successful. 150 ASCII data connection for filed (129.152.221.238,34351) (0 bytes). 226 ASCII Transfer complete.200 PORT command successful. ftp> bye 221 Goodbye. How to Copy Files to a Remote System (ftp)
In this example, the user kryten opens an ftp connection to the system pluto, and uses the put command to copy a file from his or her system to the /tmp directory on system pluto. $ cd /tmp ftp pluto Connected to pluto. 220 pluto FTP server (SunOS 5.8) ready. Name (pluto:kryten): kryten 331 Password required for kryten. Password: xxx 230 User kryten logged in. ftp> cd /tmp 250 CWD command successful. ftp> put filef 200 PORT command successful. 150 ASCII data connection for filef (129.152.221.238,34356). 226 Transfer complete. ftp> ls 200 PORT command successful. 150 ASCII data connection for /bin/ls (129.152.221.238,34357) (0 bytes). dtdbcache_:0 filea filef files ps_data speckeysd.lock 226 ASCII Transfer complete. 60 bytes received in 0.058 seconds (1.01 Kbytes/s) ftp> bye 221 Goodbye. In this example, the same user kryten uses the mput command to copy a set of files from his or her home directory to pluto's /tmp directory. Note that kryten can accept or reject individual files in the set. $ cd $HOME/testdir $ ls test1 test2 test3 $ ftp pluto Connected to pluto. 220 pluto FTP server (SunOS 5.8) ready. Name (pluto:kryten): kryten 331 Password required for kryten. Password: xxx 230 User kryten logged in. ftp> cd /tmp 250 CWD command successful. ftp> mput test* mput test1? y 200 PORT command successful. 150 ASCII data connection for test1 (129.152.221.238,34365). 226 Transfer complete. mput test2? y 200 PORT command successful. 150 ASCII data connection for test2 (129.152.221.238,34366). 226 Transfer complete. mput test3? y 200 PORT command successful. 150 ASCII data connection for filef (129.152.221.238,34356). 226 Transfer complete. ftp> bye 221 Goodbye. |
||||||||||||||||||||||||||||||||||
|