redirect - 为什么要从一台虚拟机转发到另一台?

标签 redirect ssh centos forward

我有两个虚拟机 s4 和 s6

当我尝试 ping 时,结果是:

ping s6
PING s6 (192.168.0.156) 56(84) bytes of data.
64 bytes from s6 (192.168.0.156): icmp_seq=1 ttl=64 time=0.022 ms
64 bytes from s6 (192.168.0.156): icmp_seq=2 ttl=64 time=0.032 ms

ping s4
PING s4 (192.168.0.154) 56(84) bytes of data.
64 bytes from s4 (192.168.0.154): icmp_seq=1 ttl=64 time=0.024 ms
64 bytes from s4 (192.168.0.154): icmp_seq=2 ttl=64 time=0.028 ms

当它使用 s6 尝试 ssh 时,结果是:
(它将我重定向到 s4)
#ssh root@s6
root@s6's password: 
Last login: Sat Jan 11 03:15:47 2014 from 192.168.0.219
[root@s4 ~]# 

为什么以及如何解决此重定向?

最佳答案

我会假设正在发生的事情是您的主机名在 s6 上未正确设置。尝试在 ssh root@s6 之后运行 ifconfig。我敢打赌你会得到 192.168.0.156。

我不确定如何在 centos 上解决此问题,但通常/etc 下有某种文件,例如主机名或类似主机名的文件。

关于redirect - 为什么要从一台虚拟机转发到另一台?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21060201/

相关文章:

git - FaSTLane 匹配无法通过 SSH 连接

linux - ./runInstaller Oracle 19c - 无法验证图形显示设置

php - 如果在 URL 中请求 .php 扩展名,则重定向到 404

当用户使用滚动条时,不会触发 javascript 重定向

HTTP 302 重定向 - 是否需要消息正文?

git - 创建基于ssh的远程路径

linux - 为什么我会优先使用 "service sshd reload"而不是 "service sshd restart"?

php - 从命令行执行 php 和 crontab 时权限被拒绝

python - 如何在 Anaconda 中将默认 Python 版本从 3.5 更改为 2.7

php ip地址重定向