+ -
当前位置:首页 → 问答吧 → [已解决]SSHD运行命令有错误(OpenSSH-Server)

[已解决]SSHD运行命令有错误(OpenSSH-Server)

时间:2011-08-06

来源:互联网

已经倒腾了三天ubuntu+bind+mysql了,但是都没有成功,网上找了很多资料基本千篇一律,但是我还是坚持找到了几个不同的版本,最后有参照两篇文章分别用 bind-dlz 和 mysql-bind 两种方式配置并且启动成功,但是检测的时候域名和dns服务器上面设置的A记录的IP并不一样,不知到到底哪里出错了。
--------------------------------------------------------------------------------------------------------------------------------------
用的是VMware 7.1.4安装ubuntu11.0.4,在局域网中使用桥接,主机获取的IP为192.168.0.11,虚拟机中ubuntu获取的IP为192.168.0.3,虚拟网卡为Auto eth0.
--------------------------------------------------------------------------------------------------------------------------------------
下面是具体的设置:

1.在网卡设置中选取 自动(DHCP仅地址),将dns服务器地址设置为127.0.0.1

2.mysql中dns记录为
代码:
        name                             ttl           rdtype                 rdata
   thelupine.com                    3600    SOA                    thelupine.com.
   thelupine.com                    3600    NS                 ns.thelupine.com.
   thelupine.com                    3600    MX                    10 mail.thelupine.com.
   lupunsrv.thelupine.com    3600    A                    192.168.5.1
   mail.thelupine.com            3600    CNAME            lupunsrv.thelupine.com.
   www.thelupine.com            3600    CNAME            lupunsrv.thelupine.com.


3.使用 nmsp localhost 命令查看系统服务,显示53端口已经打开
代码:
root@ecpt-virtual-machine:/usr/src# nmap localhost

Starting Nmap 5.21 ( http://nmap.org ) at 2011-08-06 01:32 CST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000011s latency).
Not shown: 996 closed ports
PORT     STATE SERVICE
53/tcp   open  domain
80/tcp   open  http
631/tcp  open  ipp
3306/tcp open  mysql


4.使用dig 命令得到的结果和数据库设置的不一样
代码:
root@ecpt-virtual-machine:/usr/src# dig @localhost thelupine.com

; <<>> DiG 9.7.3 <<>> @localhost thelupine.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50327
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;thelupine.com.         IN   A

;; ANSWER SECTION:
thelupine.com.      3600   IN   A   69.89.31.208

;; AUTHORITY SECTION:
thelupine.com.      3600   IN   NS   ns31.domaincontrol.com.
thelupine.com.      3600   IN   NS   ns32.domaincontrol.com.

;; Query time: 1695 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat Aug  6 01:24:40 2011
;; MSG SIZE  rcvd: 99


5.使用ping命令找不到主机

代码:
root@ecpt-virtual-machine:/usr/src# ping lupunsrv.thelupine.com
ping: unknown host lupunsrv.thelupine.com


---------------------------------------------------------------------------------------------------------------------------------------
参考的文章为
mysql-bind方式:http://www.thelupine.com/content/ubuntu-bind-and-mysql-sdb
bind-dlz方式:http://blog.sina.com.cn/s/blog_59929ec30100rus4.html

最后再请高手指点,不胜感激,谢谢!

作者: ecpt   发布时间: 2011-08-06