编程学习网 > 服务器 > Linux > Ubuntu指令大全系列六——远程登录
2014
11-07

Ubuntu指令大全系列六——远程登录

设置IP地址  ifconfig eth0 192.168.1.2 netmask 255.255.255.0
1.安装telnet-server

    sudo dpkg -i xinetd_1%3a2.3.14-7ubuntu3_i386.deb
    sudo dpkg -i telnetd_0.17-36build1_i386.deb

    如果连网的情况下可以 sudo apt-get install telnet 进行安装

2.设置一下ip

    sudo ifconfig eth0 192.168.1.222 netmask 255.255.255.0

3.修改/etc/xinetd.conf配置文件

    vim /etc/xinetd.conf

加入如下内容  

defaults
{
# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info(插入如下部分)
instances = 60 
log_type = SYSLOG authpriv 
log_on_success = HOST PID 
log_on_failure = HOST 
cps = 25 30
}

4.修改/etc/xinetd.d/telnet 配置文件

    vim /etc/xinetd.d/telnet

加入如下内容  

# default: on 
# description: The telnet server serves telnet sessions; it uses \ 
# unencrypted username/password pairs for authentication. 
service telnet 
{ 
disable = no
flags = REUSE 
socket_type = stream 
wait = no 
user = root 
server = /usr/sbin/in.telnetd 
log_on_failure += USERID 
}  

5.重启网络服务

sudo /etc/init.d/xinetd restart

6.打开window命令行 telnet 192.168.1.222

扫码二维码 获取免费视频学习资料

Python编程学习

查 看2022高级编程视频教程免费获取