linux ubuntu 启用 ssh sftp
stfp底层使用ssh协议
所以只要启用ssh即可
网上一般的教程支离破碎,难以应用于实际工作
以下给出正确做法
1. 编辑配置文件
vim /etc/ssh/sshd_config
2. 具体内容
PermitRootLogin true
PasswordAuthentication yes
3. 重启ssh
service sshd restart
发现有3个错误
Could not load host key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key
* Restarting OpenBSD Secure Shell server sshd Could not load host key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key
解决办法
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
ssh-keygen -t dsa -f /etc/ssh/ssh_host_ecdsa_key
ssh-keygen -t dsa -f /etc/ssh/ssh_host_ed25519_key
修改登录端口
https://www.cnblogs.com/freeweb/p/5667166.html
etc\ssh\sshd_config
修改port
然后重启ssh服务
最后更新于 2018-10-07 07:28:43 并被添加「linux sftp ubuntu 启用 ssh」标签,已有 755 位童鞋阅读过。
此处评论已关闭