Linux如何启动“sftp-server”?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15741796/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 22:37:21  来源:igfitidea点击:

Linux how to start "sftp-server"?

linuxsftpopensshrhelsshd

提问by u775856

I'm not very familiar with it but there is installed openssh/sftp-server(by a vendor before) on RHELand it was well running before i reboot the server. Then when i check after rebooted:

我对它不是很熟悉,但是在我重新启动服务器之前已经安装了openssh/sftp-server(之前由供应商)RHEL并且运行良好。然后当我重新启动后检查时:

# ps aux | grep ftp

No sftpis running but sshdis.

没有sftp正在运行,但sshd正在运行。

So how do i do to have this sftprunning please?

那么我该怎么做才能让这个sftp运行?

回答by Eugene Mayevski 'Callback

sftp subsystem is started on demand if it is enabled in the configuration file of openssh. Check the configuration file (near the end of it) to see whether sftp subsystem is enabled and whether the path to sftp executable is correct.

如果在openssh 的配置文件中启用了sftp 子系统,则它是按需启动的。检查配置文件(接近其末尾)以查看是否启用了 sftp 子系统以及 sftp 可执行文件的路径是否正确。

回答by Pedro Bezunartea López

You only need to add the following line to your /etc/ssh/sshd_config file:

您只需将以下行添加到您的 /etc/ssh/sshd_config 文件中:

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

or

或者

Subsystem sftp /usr/lib/openssh/sftp-server