Ubuntu系統中,Telnet的默認端口是23。以下是與Ubuntu中Telnet相關的詳細信息:
查看Telnet服務狀態:
sudo systemctl status telnet.socket
啟動Telnet服務(如果未運行):
sudo systemctl start telnet.socket
設置Telnet服務開機自啟:
sudo systemctl enable telnet.socket
修改Telnet監聽端口(不推薦在生產環境中這樣做,因為這可能會違反安全策略):
/etc/xinetd.d/telnet文件。server_args行,并在其后添加-p 2323(將2323替換為你想要的端口號)。sudo systemctl restart xinetd
總之,Ubuntu中Telnet的默認端口是23,但出于安全考慮,最好避免使用它或將其配置為監聽非標準端口。