宝塔服务器面板,一键全能部署及管理,送你10850元礼包,点我领取

系统运维

如何开启Gaia ISO的SFTP模式【即:解锁Bash模式】,以上传文件

How to enable SFTP access on Gaia OS

【参考KB:sk82281】

https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk82281&partition=General&product=Security

Solution:

1)   登录专家模式: HostName> expert

2)   备份当前的SSHD配置文件:

[Expert@HostName]# cp /etc/ssh/sshd_config /etc/ssh/sshd_config_ORIGINAL

3)   在Vi编辑器中编辑当前的SSHD配置文件:

[Expert@HostName]# vi /etc/ssh/sshd_config

4)   使用以下两个选项之一修改当前配置:

要么以这种方式修改:

from

#Subsystem sftp /usr/libexec/openssh/sftp-server

to

Subsystem sftp /usr/libexec/openssh/sftp-server

或者以这种方式修改:

from

#Subsystem sftp /usr/libexec/openssh/sftp-server

to

Subsystem sftp internal-sftp

5)   保存更改并退出Vi编辑器

6)   重新启动SSHD服务:

[Expert@HostName]# /etc/init.d/sshd restart

注:

运行"chsh -s /bin/bash admin"命令与上述程序完全相同,虽然它更改了默认shell,但它也启用了对安全网关的SFTP访问。

要返回默认shell,简单运行 "chsh -s /etc/cli.sh admin"命令即可。

EndPoint学习之路_管理维护篇:如何开启Gaia ISO的SFTP模式【即:解锁Bash模式】-风君子博客