Although it is not necessary to modify the FTP service port under Solaris, I was asked by the Huawei interviewer today, Khan. It means that I am still not very familiar with it.
The FTP service port under Solaris. The default port is port 21 for data transmission.
Previously I thought it was a configuration file under the/etc/ftpd directory. I came back to the Internet today and found some information. I used to modify the/etc/inet/services file (this file has a symbolic link/etc/services file ).
The/etc/inet/services file is read-only, but can be forcibly written as root.
The content format of this file is as follows:
Service name port/protocol alias
The content of the FTP port is as follows:
FTP-data 20/tcp
FTP 21/tcp
After modifying the configuration file, do not forget to apply the latest configuration again. (there is a saying on the Internet that it is a luxury to restart inetd, that is, restart all network-related services. who knows other network services are not used yet .)
However, we recommend that you use inetd restart directly. For the usage of inetd, please use man inetd.
You can use inetadm to first disable the FTP service, and then enable it:
Inetadm-D FTP
Inetadm-e FTP
The role and usage of inetdadm can be man.
Finally, let's talk about how to log on from the command line after the default FTP port is modified. In fact, FTP cannot use the Telnet host port style as telnet, but after entering the FTP interpreter, use the open host port method to connect.