温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

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

发布时间:2020-07-30 13:07:19 来源:网络 阅读:294 作者:TimeOwner 栏目:系统运维

如何开启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"命令即可。


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI