小编Ste*_*hen的帖子

SSH 与堡垒主机 - stdio 转发失败

我正在 AWS 上设置堡垒主机(这里有一些详细信息:https : //www.nadeau.tv/ssh-with-a-bastion-host/),以允许我安全访问我拥有的其他 EC2 实例亚马逊。

我在尝试通过堡垒主机进行代理时遇到了一些问题。

我的 SSH 配置文件如下:

# Bastion Host
Host bastion
User ec2-user
Hostname XX.XX.XX.XXX
IdentityFile ~/.ssh/keys/bastion.pem

# EC2 Instance
Host 172.*
User ec2-user
IdentityFile ~/.ssh/keys/bastion.pem
ProxyCommand ssh bastion -W %h:%p
Run Code Online (Sandbox Code Playgroud)

以下是命令行的详细输出:

Jeff-Bezos-iMac:tmp jeff$ ssh 172.xx.x.xx -v
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /Users/jeff/.ssh/config
debug1: /Users/jeff/.ssh/config line 9: Applying options for 172.*
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Executing proxy command: exec ssh bastion -W 172.xx.x.xx:22
debug1: key_load_public: No such file or …
Run Code Online (Sandbox Code Playgroud)

ssh proxy

7
推荐指数
1
解决办法
2万
查看次数

标签 统计

proxy ×1

ssh ×1