我可以通过以下方式成功连接到我的服务器,ssh但是在尝试运行该scp命令时出现连接超时。
$ scp ~/.ssh/id_rsa.pub root@192.168.12.2:id_rsa.pub
ssh: connect to host 192.168.12.2 port 22: Connection timed out
lost connection
Run Code Online (Sandbox Code Playgroud)
是的,我的客户端和服务器上都安装了 openssh-client 和 openssh-server 。
我的路由器还配置为转发 ssh 端口 22,但我没有启用防火墙。
ssh ×1