如何開啓Gaia ISO的SFTP模式【即:解鎖Bash模式】,以上傳文件
How to enable SFTP access on Gaia OS
【參考KB:sk82281】
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"命令即可。