EndPoint學習之路_管理維護篇:如何開啓Gaia ISO的SFTP模式【即:解鎖Bash模式】

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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章