sftp设置端口_更改电脑端口号

sftp设置端口_更改电脑端口号SFTPisasecureversionoftheFTP.SFTPprovidesanencryptedchannelwitharemoteserver.ThismakesauthenticationanddatatransfermoresecurethanFTP.SFTPprotocolisgenerallyprovidedbyS…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

SFTP is a secure version of the FTP. SFTP provides an encrypted channel with a remote server. This makes authentication and data transfer more secure than FTP. SFTP protocol is generally provided by SSH servers by default. In this tutorial, we will learn the default SFTP port and how to change it to a different one.

SFTP是FTP的安全版本。 SFTP提供与远程服务器的加密通道。 这使身份验证和数据传输比FTP更安全。 默认情况下,SSH服务器通常提供SFTP协议。 在本教程中,我们将学习默认的SFTP端口以及如何将其更改为其他端口。

Linux Sftp Command With Examples

Linux Sftp命令示例

SFTP默认端口TCP 22(SFTP Default Port TCP 22)

SFTP is a subsystem of the SSH service or daemon. So this makes SFTP listen TCP 22 port. We can use the following sftp command to connect remote system SFTP service.

SFTP是SSH服务或守护程序的子系统。 因此,这使SFTP侦听TCP 22端口。 我们可以使用以下sftp命令来连接远程系统SFTP服务。

$ sftp 172.16.110.135
SFTP Default Port TCP 22
SFTP Default Port TCP 22
SFTP默认端口TCP 22

更改默认的SFTP端口 (Change Default SFTP Port)

If we want to change the default SFTP port we need to change SSH configuration which will also change the default SSH port. We need to open the SSH config file /etc/ssh/sshd_config and change

如果要更改默认的SFTP端口,则需要更改SSH配置,这也将更改默认的SSH端口。 我们需要打开SSH配置文件/etc/ssh/sshd_config并进行更改

#Port 22

To whatever we want. In this example, we change to the 2222 . This configuration will be more secure because it is harder to find by attackers.

无论我们想要什么。 在此示例中,我们更改为2222 。 此配置将更加安全,因为攻击者很难找到它。

Port 2222
Change Default SFTP Port
Change Default SFTP Port
更改默认的SFTP端口

After we changed the configuration file we need to make active the new configuration. We should restart the SSH services which will reread the configuration file and use the new SFTP port number. We will use systemctl command but other service management commands are welcome.

更改配置文件后,我们需要激活新配置。 我们应该重新启动SSH服务,它将重新读取配置文件并使用新的SFTP端口号。 我们将使用systemctl命令,但欢迎使用其他服务管理命令。

$ sudo systemctl restart sshd
SSH Service
SSH Service
SSH服务

如何为客户端指定不同的SFTP(How To Specify Different SFTP For Client)

During daily usage, we may need to connect remote SFTP server which port is different than default one which is TCP/22. We have to specify remote SFTP server port explicitly with the -P option and ports number to the sftp command.

在日常使用中,我们可能需要连接远程SFTP服务器,该服务器的端口不同于默认端口TCP / 22。 我们必须使用-P选项和sftp命令的端口号显式指定远程SFTP服务器端口。

$ sftp -P 2222 poftut.com

SFTP与FTPS / SSL (SFTP vs FTPS/SSL)

As stated previous SFTP is a function of the SSH protocol. So it is different than FTP mechanism. As FTP is not a secure or encrypted protocol it provides some security mechanism like SSL tunneling. FTPS or FTP SSL is secured version of FTP and shouldn’t be confused with SFTP. FTPS listen for regular FTP port 21 or whatever it is configured.

如前所述,SFTP是SSH协议的功能。 因此它不同于FTP机制。 由于FTP不是安全协议或加密协议,因此它提供了一些安全机制,例如SSL隧道。 FTPS或FTP SSL是FTP的安全版本,请勿与SFTP混淆。 FTPS侦听常规FTP端口21或配置的任何端口。

SFTP2 (SFTP2)

As SSH has two main versions name 1 and 2 SFTP is related to SSH. So in order to express an SFTP which works on only over SSHv2, we generally use SFTP2 . In another way SFTP2 will only work with `SSH version 2 services.

由于SSH有两个主要版本,名称分别为1和2,因此SFTP与SSH相关。 因此,为了表示只能在SSHv2上运行的SFTP,我们通常使用SFTP2SFTP2仅可用于`SSH版本2服务。

LEARN MORE  How To Generate Putty Keys wit Puttygen?

了解更多如何通过Puttygen生成腻子密钥?

FTP / SSL,FTP / TLS,基于SSL的FTP,基于TLS的FTP,FTPS (FTP/SSL, FTP/TLS, FTP over SSL, FTP over TLS, FTPS)

All of these may seem the same as SFTP but they are not. They are used for FTP connections over SSL/TLS tunnels. They are different protocols. And they are using a different port than SFTP. They use FTP port which is TCP 21.

所有这些似乎都与SFTP相同,但事实并非如此。 它们用于通过SSL/TLS隧道的FTP连接。 它们是不同的协议。 他们使用的端口与SFTP不同。 他们使用的是TCP 21 FTP端口。

TFTP (TFTP)

TFPT is a way different protocol which is similar to the FTP but provides fewer options. TFTP do no have any encryption or similar functions to secure remote data transfer. To get more details about TFTP please read the following tutorial.

TFPT是一种不同的协议,类似于FTP但提供的选项较少。 TFTP没有任何加密或类似功能来保护远程数据传输。 要获取有关TFTP的更多详细信息,请阅读以下教程。

How To Install, Configure and Run Linux Tftp Client

如何安装,配置和运行Linux Tftp客户端

翻译自: https://www.poftut.com/what-is-default-sftp-port-and-how-to-change-sftp-port-number/

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/193789.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • MySQL与php时间戳与日期格式的相互转换[通俗易懂]

    MySQL与php时间戳与日期格式的相互转换[通俗易懂]文章来自:源码在线https://www.shengli.me/php/336.html  

    2022年6月21日
    31
  • char与byte的区别

    char与byte的区别很多初学者 包括我 已经学了一年多 java 了 肯会对 char 和 byte 这两种数据类型有所疑惑 相互混淆 今天特地查了好多资料 对 byte 和 char 两种数据类型进行了总结和比较 先将结果与大家分享 nbsp nbsp nbsp nbsp byte nbsp 是字节数据类型 nbsp 是有符号型的 占 1 nbsp 个字节 大小范围为 128 127 char nbsp 是字符数据类型 nbsp 是无符号型的 占 2 字节 Unicode 码 nbsp 大小范围 nbsp 是 0 65

    2025年7月5日
    3
  • java8两个List集合取交集、并集、差集、去重并集

    java8两个List集合取交集、并集、差集、去重并集、、、importjava.util.ArrayList;importjava.util.List;importstaticjava.util.stream.Collectors.toList;publicclassTest{publicstaticvoidmain(String[]args){List<String>list1=new…

    2022年9月1日
    3
  • 离散数学总复习精华版(最全 最简单易懂)已完结

    离散数学总复习精华版(最全 最简单易懂)已完结离散数学期末总复习精华版P1命题逻辑的基本概念虽然是不确定但是可以是命题就是无法判断真假优先级P2命题逻辑等值演算第一种方法:真值表求第二种用等值演算求P3命题逻辑推理理论下面给出例题后面的可以写成前提引入T12下面给出反证法附加前提证明:…………

    2022年6月18日
    27
  • Python写代码的用法建议「建议收藏」

    Python写代码的用法建议「建议收藏」1.MutableandimmutabletypesPython有两种内置或用户定义的类型可变类型是允许就地修改内容的类型。典型的可变列表是列表和词典:所有列表都有变异方法,如 l

    2022年7月5日
    23
  • arping命令用法

    arping命令用法arping命令使用说明BusyBoxv1.17.3(2011-07-2017:01:30CST)multi-callbinary.Usage:arping[-fqbDUA][-cCNT][-wTIMEOUT][-IIFACE][-sSRC_IP]DST_IPSendARPrequests/repliesOptions: -f Quiton…

    2022年5月27日
    43

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号