V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
marchtea
V2EX  ›  问与答

buyvm kvm的机器怎么联网?

  •  
  •   marchtea · 2013-05-16 21:01:49 +08:00 · 4756 次点击
    这是一个创建于 3970 天前的主题,其中的信息可能已经有所发展或是发生改变。
    第一次用VPS,好不容易购买完了,用vnc装好系统后发现自己机器ping不通vps,看了wiki之后把IP设置为static。发现就能连上了。不过这样子就会有问题,过一阵子(几个小时后),我就发现又连不上了,只能又用vnc重启下网络才行。
    如果设置成dhcp的话就无法联网了。
    求指导~
    6 条回复    1970-01-01 08:00:00 +08:00
    lemonda
        1
    lemonda  
       2013-05-16 21:13:29 +08:00
    按照wiki和邮件里的方法设置就行,Debian为例
    /etc/network/interfaces内容:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback
    auto eth0
    iface eth0 inet static
    address VPS的IP地址
    netmask 255.255.255.0
    gateway VPS的IP地址前三段.1
    marchtea
        2
    marchtea  
    OP
       2013-05-16 21:18:20 +08:00
    @lemonda 嗯,我设置了,但是运行一阵子之后,又没网了,就得再network restart一下才行。
    lemonda
        3
    lemonda  
       2013-05-16 21:22:19 +08:00   ❤️ 1
    @marchtea 提交个工单问下吧,可能是主机问题。
    marchtea
        4
    marchtea  
    OP
       2013-05-16 21:24:00 +08:00
    @lemonda 嗯嗯。谢谢啦
    shoper
        5
    shoper  
       2013-05-16 21:32:40 +08:00
    搭车问,如果把SSH的端口设成443,是buyvm openvz的vps.
    thedevil5032
        6
    thedevil5032  
       2013-05-16 21:48:06 +08:00   ❤️ 1
    @shoper
    如果我没理解错的话,你是想要改 SSH Daemon 的监听端口。

    参照 ArchLinux 的 WIKI,只需要修改 /etc/ssh/sshd_config (可能不同系统位置不同)中,#Port 22 -> Port 443。
    也就是说去掉 #,并且修改端口号 22 为 443。

    来源: https://wiki.archlinux.org/index.php/Ssh#Daemon
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2882 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 13:05 · PVG 21:05 · LAX 06:05 · JFK 09:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.