FreeSSHD的配置

内含多坑

项目需求:定时将内网的Linux客户端文件定时上传到公网阿里云Windows服务器

使用工具:FreeSSHD

具体过程:

1、FreeSSHD下载地址

http://www.freesshd.com/?ctt=download

2、确保阿里云开放了22端口,如果不用22端口,检查一下其他端口是否打开,使用telnet命令

telnet 39.xxx.xxx.xxx port

如果显示

正在连接39.xxx.xxx.xx...无法打开到主机的连接。 在端口 port: 连接失败

说明改端口不可用,否则该端口可用

3、安装后使用管理员权限运行

a) Server status

b) user properties

有3种方式,Public key (SSH only)可以不用每次输入密码,password stored as SHA1 hash普通的方式

使用Public key (SSH only)配置,将要连接到阿里云的客户端的机子的公钥(id_rsa.pub)拷贝到C:\Program Files (x86)\freeSSHd目录下,并且将id_rsa.pub重命名为user。

https://shades-of-orange.com/post/setting-up-freesshd-to-connect-to-its-sftp-server-using-ssh-public-key-authentication

密钥生成

ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): [直接回车]
Enter passphrase (empty for no passphrase): [直接回车]
Enter same passphrase again: [直接回车]
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
...

 

3) SSH

这里的Max number of connections:不能是0,否则连不上

4、服务里面将FreeSSHDService 重启即可更新配置

 

 

 

 

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