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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • pytorch: tensor与numpy之间的转换[通俗易懂]

    pytorch: tensor与numpy之间的转换[通俗易懂]训练时,输入一般为tensor,但在计算误差时一般用numpy;tensor和numpy的转换采用numpy()和from_numpy这两个函数机型转换。值得注意的是,这两个函数所产生的tensor和numpy是共享相同内存的,而且两者之间转换很快。importtorchimportnumpyasnp#Converttensortonumpya=torch.ones(3)b=a.numpy()print(a,b)a+=1print(a,b)#Conve

    2022年10月18日
    3
  • BeanCopier_protobuf的简单使用

    BeanCopier_protobuf的简单使用BeanCopier的简单使用cglib包下的一个类.简单栗子//创建实例.BeanCopiercopier=BeanCopier.create(source.getClass(),target.getClass(),false);//Copy操作copier.copy(person1,person2,null);注意到:第三个参数userConve…

    2025年9月14日
    11
  • matlab中的imwrite_medfilt2函数

    matlab中的imwrite_medfilt2函数1.imwrite函数imwrite函数的作用是将图像写入图形文件。2.语法imwrite(A,filename)imwrite(A,map,filename)imwrite(___,fmt)imwrite(___,Name,Value)(1)imwrite(A,filename)将图像数据A写入filename指定的文件,并从扩展名推断出文件格式。imwrite在当前文件夹中创建新文件。输出图像的位深度取决于A的数据类型和文件格式。对于大多数格式来说: 如果……

    2022年10月4日
    5
  • 超详细VSCode安装教程(Windows)「建议收藏」

    本文基于Windows系统博主的VSCode专栏:分享使用VSCode的基本操作与各种技巧

    2022年4月4日
    151
  • Android物联网应用程序开发(智慧城市)—— 摄像头监控界面开发「建议收藏」

    Android物联网应用程序开发(智慧城市)—— 摄像头监控界面开发「建议收藏」效果:布局代码:<?xmlversion=”1.0″encoding=”utf-8″?><RelativeLayoutxmlns:android=”http://schemas.android.com/apk/res/android”xmlns:app=”http://schemas.android.com/apk/res-auto”xmlns:tools=”http://schemas.android.com/tools”android

    2022年6月18日
    27
  • StringUtils工具类常用方法「建议收藏」

    StringUtils工具类常用方法「建议收藏」StringUtils类在操作字符串是安全的,不会报空指针异常,也正因此,在操作字符串时使用StringUtils相比使用原生的String会更加安全。一、判空StringUtils提供常用的判断空字符串有两个方法:isEmpty和isBlank,这两者的有何区别呢,直接看源码://isEmptypublicstaticbooleanisEmpty(Stringstr)…

    2022年6月11日
    37

发表回复

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

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