SCO Unix»How to change a Unix ftp port …
  • RSS Feed

Last modified on 1/15/2015 2:29 AM by User.

Tags:

How to change a Unix ftp port number

Here's how you change the port on which FTP is serviced on a SCO Unix machine:
 
Configuration:
 
1.  Open the /etc/services file with a text editor and modify the following entries:
 
    ftp-data        20/tcp
    ftp               21/tcp
 
20 and 21 are the port numbers respectively that need to be changed to new values.  You can edit the values to:
 
    ftp-data        65120/tcp
    ftp               65121/tcp
 
This will change the port on which FTP is serviced to 65121 (the second entry).   The first entry (ftp-data), will automatically sent to the client from the server.
 
2.  Restart the "inetd" daemon
 
Run the command:
   
    ps -ef | grep inetd
 
you will see a process entry for "inetd"
 
kill that process using:
 
    kill <pid> 
 
    where <pid> is the process id.
 
Now run the command:
 
    /etc/inetd
 
Then verify if the "inetd" process is running using the "ps" command above.
 
Invoking FTP to the server:
 
Once this change is made, you cannot open an ftp connection to the server using ftp in the command line directly to the server.  i.e.:
 
    ftp <server_name> 
 
will NOT work.
 
Instead you have to do the following:
 
   $ ftp
   ftp>  open <server_name>  65121
 
Note that the only port number you explicitly use will be that of the second (ftp) entry in /etc/services, not the first (ftp-data) entry.  However, you do need to change both entries.