1. 通过Telnet
以一般用户登录系统
执行命令 sudo apt-get install xinetd
系统提示输入用户密码,输入密码后安装xinet软件包
执行命令 sudo apt-get install telnetd
系统提示输入用户密码,输入密码后安装telnet软件包
执行命令 sudo touch /etc/xinetd.d/telnet新建一个文件内容如下,并保存
执行命令 sudo nano -w /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
-
- }
# 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
}
执行如下命令:sudo nano -w /etc/xinetd.conf 并加入如下内容:
- instances = 60
- log_type = SYSLOG authpriv
-
- log_on_success = HOST PID
-
- log_on_failure = HOST
-
- cps = 25 30
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
执行命令 sudo /etc/init.d/xinetd restart
2. 通过SSH登录
1、Ubuntu默认没有安装SSH ,可以在新得利软件安装程序里,搜索SSH,标记并安装;
或者使用命令:
sudo apt-get install openssh-server
sudo
/etc/init.d/ssh restart
ssh localhost
用netstat -tlp可以查看ssh服务已经打开.
显示如: tcp6 0 0[::]:ssh [::]:* LISTEN
2、然后在Ubuntu里,菜单‘系统’ - ‘首选项’ - ‘远程桌面’ ,打开相关选项 。
3、在 Windows系统里 ,使用
Putty 或者 SSH Secure Shell Client
进行登录,输入机器名或IP、用户名、端口、密码,即可登录到Ubuntu终端界面