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)
上一篇 2025年11月18日 下午4:43
下一篇 2025年11月18日 下午5:15


相关推荐

  • matlab中的振铃现象是啥,振铃现象产生的原因

    matlab中的振铃现象是啥,振铃现象产生的原因振铃现象是怎么回事?是什么?如何减小和抑制上冲及振铃?下面就由小编告诉大家和抑制方法吧!由于任何传输线都不可避免地存在着引线电阻、引线电感和杂散电容,因此,一个标准的脉冲信号在经过较长的传输线后,极易产生上冲和振铃现象。大量的实验表明,阴线电阻可使脉冲的平均振幅减小;而杂散电容和引线电感的存在,则是产生上冲和振铃的根本原因。在脉冲前沿上升时间相同的条件下,阴线电感越大,上冲及振铃现象就越严重;杂散…

    2025年6月9日
    4
  • google软件测试之道_gtest测试框架

    google软件测试之道_gtest测试框架gtest提供了一套优秀的C++单元测试解决方案,简单易用,功能完善,非常适合在项目中使用以保证代码质量。

    2026年4月18日
    7
  • 最详细的maven配置——报错了你打我[通俗易懂]

    最详细的maven配置——报错了你打我[通俗易懂]目录1、前言2、下载3、配置PATH、settings.xml以及本地仓库3.1、配置path3.2、配置settings.xml和本地仓库4、在IDEA中配置Maven1、前言maven说的简短一点就是一个大型的jar包管理工具,类似于工具人。只要有了maven,就不用去幸幸苦苦的找jar包了。wc,爽哉。好了,还是不多bb,我么还是直接干正事。(切记切记:安装maven必须装好jdk)2、下载首先我们还是去官网。瞅瞅最新版的是哪个版本。点我直达当然,玩Windows的人都知道,我们下

    2022年5月28日
    54
  • Redis缓存淘汰策略

    Redis缓存淘汰策略常用缓存策略常用的缓存淘汰策略有以下先进先出算法 FIFO LeastFrequen LFU 淘汰一定时期内被访问次数最少的页面 以次数作为参考 LeastRecentl LRU 淘汰最长时间未被使用的页面 以时间作为参考这些算法在不同层次的缓存上执行时拥有不同的效率和代价 需根据具体场合选择最合适的一种 FIFOFIFO FirstinFirst 先进先出 在 FIFOCache 设计中 核心原则就是 如果一个数据最先进入缓存中

    2026年3月26日
    2
  • js 访问asmx接口「建议收藏」

    js 访问asmx接口「建议收藏」用C#写了一个接口,js需要用ajax访问varjsonObj=newObject();jsonObj[‘cid’]=cid;$.ajax({type:”POST”,url:”/tv/hub.asmx/getDeviceLogs”,data:JSON.string…

    2022年6月10日
    63
  • maven配置多仓库镜像「建议收藏」

    maven配置多仓库镜像「建议收藏」问题场景:1、国内访问maven默认远程中央镜像特别慢2、用阿里的镜像替代远程中央镜像3、大部分jar包都可以在阿里镜像中找到,部分jar包在阿里镜像中没有,需要单独配置镜像我想达到的目标:在maven中配置一主一副两个镜像,大部分jar直接通过主镜像可以找到,部分特殊jar在主镜像中找不到时,自动去副镜像中寻找。我所处的阶段:修改了maven的全局配置文件settin…

    2022年5月28日
    150

发表回复

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

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