ubuntu23.04测试版安装后,安装完openssh-server后修改默认端口问题;
安装后默认端口是22端口,如下图:
修改文件为/etc/ssh/sshd_config
重启后的结果
重新载入后的结果
现在是这样的结果 ,不知道应该怎么样操作呢, 是系统的问题, 还没有修复呢, 还是别的问题呢
ubuntu 23.04安装完后,修改ssh端口问题
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 41
- 注册时间: 2018-01-30 12:55
- 系统: ubuntu 23.04
- 来自: china
- 联系:
- astolia
- 论坛版主
- 帖子: 6703
- 注册时间: 2008-09-18 13:11
Re: ubuntu 23.04安装完后,修改ssh端口问题
你第二张图里的第一段注释文字可能是原因
https://manpages.ubuntu.com/manpages/ki ... fig.5.html
https://manpages.ubuntu.com/manpages/ki ... fig.5.html
Note: On Ubuntu, the openssh-server package is configured to use systemd socket-
based activation by default. Therefore if you are using systemd with the default
configuration, Port options will not be honored. Address configuration must be
handled in /etc/systemd/system/ssh.socket.d instead.
-
- 帖子: 41
- 注册时间: 2018-01-30 12:55
- 系统: ubuntu 23.04
- 来自: china
- 联系:
Re: ubuntu 23.04安装完后,修改ssh端口问题
应该是这个原因, 新系统装完后没有这个文件夹和文件astolia 写了: ↑2023-04-14 10:15 你第二张图里的第一段注释文字可能是原因
https://manpages.ubuntu.com/manpages/ki ... fig.5.htmlNote: On Ubuntu, the openssh-server package is configured to use systemd socket-
based activation by default. Therefore if you are using systemd with the default
configuration, Port options will not be honored. Address configuration must be
handled in /etc/systemd/system/ssh.socket.d instead.
/etc/systemd/system/ssh.socket.d/addresses.conf
试着手动创建了文件也不行,端口还是修改不了。
-
- 帖子: 41
- 注册时间: 2018-01-30 12:55
- 系统: ubuntu 23.04
- 来自: china
- 联系:
Re: ubuntu 23.04安装完后,修改ssh端口问题
我用着正常的系统是从22.04升上来的, 没有问题, 新的镜像安装完后就会有这样的问题。virtual163 写了: ↑2023-04-14 12:56应该是这个原因, 新系统装完后没有这个文件夹和文件astolia 写了: ↑2023-04-14 10:15 你第二张图里的第一段注释文字可能是原因
https://manpages.ubuntu.com/manpages/ki ... fig.5.htmlNote: On Ubuntu, the openssh-server package is configured to use systemd socket-
based activation by default. Therefore if you are using systemd with the default
configuration, Port options will not be honored. Address configuration must be
handled in /etc/systemd/system/ssh.socket.d instead.
/etc/systemd/system/ssh.socket.d/addresses.conf
试着手动创建了文件也不行,端口还是修改不了。
-
- 帖子: 41
- 注册时间: 2018-01-30 12:55
- 系统: ubuntu 23.04
- 来自: china
- 联系:
Re: ubuntu 23.04安装完后,修改ssh端口问题
ubuntu 23.04快发布了, 今天用的是4月18号发的镜像,在thinkpad T14 Gen2的笔记本上用新硬盘进行了安装测试,发现装完后风站逛转,进不了桌面,还有用虚拟机测试发现, ssh端口还是修改不了。