我遵循使用防火墙规则的VPC / Cloud平台的VPC文档,但是每当我尝试连接时,我就会得到以下结果:
作业超时
客户端-详细模式:
$ sftp -v -P 2222 username@x.x.x
OpenSSH_6.2p2, OpenSSL 0.9.8y 5 Feb 2013
debug1: Reading configuration data /home/alexus/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to x.x.x [x.x.x.x] port 2222.
debug1: connect to address x.x.x.x port 2222: Operation timed out
ssh: connect to host x.x.x port 2222: Operation timed out
Connection closed
$
服务器端:
由于我的数据包没有到达目的地,在日志中没有任何东西(或者我找错地方了)。
快速回顾:
请给我建议。
发布于 2018-02-13 07:31:34
我不想让任何人知道细节,但是答案(至少对我来说)很简单.
发布于 2018-02-08 06:29:53
检查实例是否被标记"sftp2222“标记。还要检查ssh守护进程是否设置为侦听端口2222 (在您的sshd_config中,这2处理如下:- ListenAddress -端口)。作为其他测试,允许ICMP在相同的防火墙规则中并尝试平实例。如果它工作,防火墙规则是正确设置的,如果没有,防火墙规则中有一些配置错误。
发布于 2018-02-13 04:18:19
I would have added a comment instead but I have a privilege lower than 50.
你是想把货物装进GKE码头集装箱吗?
您是否检查过防火墙规则是否具有正确的优先级设置,并且上面没有其他规则会妨碍您的工作?
https://serverfault.com/questions/896195
复制