免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4769 | 回复: 2
打印 上一主题 下一主题

[网络管理] Debian的/ect/hosts解析的问题,提示unable to resolve host by name。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-06-10 08:56 |只看该作者 |倒序浏览
本帖最后由 apzc2529 于 2014-06-10 08:56 编辑

升级系统后发现两个小问题,想请教一下问题处在哪里了。

(1)  ping、ssh命令均可以解析计算机名lnm2312,而scp却无法解析计算机名,提示ssh: Could not resolve hostname lnm2312: Invalid argument。
  1. cunzhang@Debian:~$ ping lnm2312
  2. PING lnm2312 (192.168.1.61) 56(84) bytes of data.
  3. 64 bytes from lnm2312 (192.168.1.61): icmp_req=1 ttl=64 time=0.402 ms
  4. ^C
  5. --- lnm2312 ping statistics ---
  6. 1 packets transmitted, 1 received, 0% packet loss, time 0ms
  7. rtt min/avg/max/mdev = 0.402/0.402/0.402/0.000 ms
  8. cunzhang@Debian:~$ ssh lnm2312
  9. Linux lnm2312 3.2.0-1-amd64 #1 SMP Sun Feb 5 15:17:15 UTC 2012 x86_64

  10. The programs included with the Debian GNU/Linux system are free software;
  11. the exact distribution terms for each program are described in the
  12. individual files in /usr/share/doc/*/copyright.

  13. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
  14. permitted by applicable law.
  15. Last login: Tue Jun 10 08:44:37 2014 from 192.168.1.60
  16. cunzhang@lnm2312:~$ logout
  17. Connection to lnm2312 closed.
  18. cunzhang@Debian:~$ scp ~/test.data lnm2312:~/
  19. ssh: Could not resolve hostname lnm2312: Invalid argument
  20. lost connection
复制代码
(2) 访问本地vncserver的问题, 一般情况下都是通过vncviewer :3这种方式访问,现在却提示unable to resolve host by name,
用vncviewer 127.0.0.1:3可以访问。
  1. cunzhang@Debian:~$ vncviewer :3

  2. VNC Viewer Free Edition 4.1.1 for X - built Jan 30 2013 16:07:52
  3. Copyright (C) 2002-2005 RealVNC Ltd.
  4. See http://www.realvnc.com for information on VNC.

  5. Tue Jun 10 08:46:18 2014
  6. main:        unable to resolve host by name: Resource temporarily unavailable
  7.               (11)
  8. cunzhang@Debian:~$ vncviewer 127.0.0.1:3

  9. VNC Viewer Free Edition 4.1.1 for X - built Jan 30 2013 16:07:52
  10. Copyright (C) 2002-2005 RealVNC Ltd.
  11. See http://www.realvnc.com for information on VNC.

  12. Tue Jun 10 08:46:25 2014
  13. CConn:       connected to host 127.0.0.1 port 5903
  14. CConnection: Server supports RFB protocol version 3.8
  15. CConnection: Using RFB protocol version 3.8
  16. TXImage:     Using default colormap and visual, TrueColor, depth 24.
  17. CConn:       Using pixel format depth 6 (8bpp) rgb222
  18. CConn:       Using ZRLE encoding
  19. CConn:       Throughput 20035 kbit/s - changing to hextile encoding
  20. CConn:       Throughput 20035 kbit/s - changing to full colour
  21. CConn:       Using pixel format depth 24 (32bpp) little-endian rgb888
  22. CConn:       Using hextile encoding
  23. CConn:       Throughput 20000 kbit/s - changing to raw encoding
  24. CConn:       Using raw encoding
复制代码

论坛徽章:
0
2 [报告]
发表于 2014-06-10 15:00 |只看该作者
第一个问题,  /etc/hosts中是否有
192.168.1.61  lnm2312  
字样?  如果没有,加入之后试试看。

vncview的问题不是很懂,建议看看你的域名解析服务器是否工作正常

论坛徽章:
0
3 [报告]
发表于 2014-06-10 17:12 |只看该作者
回复 2# chengxiaowei

有的。你看我贴的输出结果,ssh命令可以解析lnm2312, 而scp却不行。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP