笔记笔记
  • Home
  • AI&ML
  • Example
  • Zoo
  • 关于
⌘ K
OpenSSH
最后更新时间:
Copyright © 2023-2024 | Powered by dumi | GuoDapeng | 冀ICP备20004032号-1 | 冀公网安备 冀公网安备 13024002000293号

TABLE OF CONTENTS

‌
‌
‌
‌

OpenSSH

安装 OpenSSH Server。

sudo apt install openssh-server
# systemctl restart sshd
# systemctl status sshd

SFTP

在 Ubuntu 22.04.3 LTS 中,安装完成 OpenSSH Server 就可以登入了。

这里需要注意,如果发现不能登入,可以做如下修改

vi /etc/ssh/sshd_config
#PermitRootLogin prohibit-password
PermitRootLogin yes

ssh 内网穿透

开启云服务器 ssh server代理功能。

vi /etc/ssh/sshd_config
#GatewayPorts no
GatewayPorts yes

建立 ssh 隧道

ssh -g -R 8501:0.0.0.0:8501 root@62.234.218.147