1. administratively prohibited: open failed

用 SSH 打了一个洞,然后发现这个错误:

  1. [[email protected].io ~]# ssh [email protected].8.8.8 -D 0.0.0.0:9999
  2. channel 2: open failed: administratively prohibited: open failed
  3. channel 3: open failed: administratively prohibited: open failed
  4. channel 4: open failed: administratively prohibited: open failed
  5. channel 5: open failed: administratively prohibited: open failed
  6. channel 4: open failed: administratively prohibited: open failed
  7. channel 5: open failed: administratively prohibited: open failed
  8. channel 4: open failed: administratively prohibited: open failed
  9. channel 5: open failed: administratively prohibited: open failed
  10. channel 16: open failed: administratively prohibited: open failed
  11. channel 17: open failed: administratively prohibited: open failed

查看一下错误日志:

  1. [[email protected].io]# tailf /var/log/secure
  2. Jul 28 21:15:46 bwg sshd[5158]: error: connect_to driver.google.com: unknown host (Name or service not known)
  3. Jul 28 21:15:46 bwg sshd[5158]: error: connect_to driver.google.com: unknown host (Name or service not known)
  4. Jul 28 21:15:47 bwg sshd[5158]: error: connect_to driver.google.com: unknown host (Name or service not known)
  5. Jul 28 21:15:47 bwg sshd[5158]: error: connect_to driver.google.com: unknown host (Name or service not known)
  6. Jul 28 21:15:48 bwg sshd[5158]: error: connect_to driver.google.com: unknown host (Name or service not known)
  1. 嗯,域名写错了,那肯定访问不通的,应该是 `drive.google.com`

2. 通过跳板机访问内部机器

  1. [[email protected].io]# ssh [email protected]目标机器ip -p 22 -o ProxyCommand='ssh -p 22 [email protected]跳板机ip -W %h:%p'