1. 程式人生 > >centos7下安裝telnet服務

centos7下安裝telnet服務

先檢視是否安裝Telnet

[[email protected] ~]# rpm -qa | grep telnet
telnet-server-0.17-64.el7.x86_64
telnet-0.17-64.el7.x86_64

若沒有安裝,則分別安裝telnet 和 telnet-server

[[email protected] ~]# yum install telnet-server
Loaded plugins: fastestmirror
Repository HDP-UTILS-1.1.0.21 is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
–> Running transaction check
—> Package telnet-server.x86_64 1:0.17-64.el7 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
Package Arch Version Repository Size
\==================================================================================================================================
Installing:
telnet-server x86_64 1:0.17-64.el7 base 41 k
Transaction Summary
\==================================================================================================================================
Install 1 Package
Total download size: 41 k

注意:telnet-server服務啟動依賴xinetd服務。

檢視是否安裝xinetd

[[email protected] ~]# rpm -qa | grep xinetd
[[email protected] ~]#

安裝xinetd

[[email protected] ~]# yum install -y xinetd
Loaded plugins: fastestmirror
Repository HDP-UTILS-1.1.0.21 is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies

Transaction test succeeded
Running transaction
Installing : 2:xinetd-2.3.15-13.el7.x86_64 1/1
Verifying : 2:xinetd-2.3.15-13.el7.x86_64 1/1
Installed:
xinetd.x86_64 2:2.3.15-13.el7
Complete!

開啟xinetd服務並設定為開機自啟。

[[email protected] ~]# systemctl enable xinetd.service
[[email protected] ~]# systemctl status xinetd.service
● xinetd.service - Xinetd A Powerful Replacement For Inetd
Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled; vendor preset: enabled)
Active: inactive (dead)
[

[email protected] ~]# systemctl start xinetd.service
[[email protected] ~]# systemctl status xinetd.service
● xinetd.service - Xinetd A Powerful Replacement For Inetd
Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-01-18 09:59:00 CST; 2s ago
Process: 55642 ExecStart=/usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid $EXTRAOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 55643 (xinetd)
CGroup: /system.slice/xinetd.service
└─55643 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
Jan 18 09:59:00 Hortonworks02 xinetd[55643]: removing discard
Jan 18 09:59:00 Hortonworks02 xinetd[55643]: removing discard
Jan 18 09:59:00 Hortonworks02 xinetd[55643]: removing echo
Jan 18 09:59:00 Hortonworks02 xinetd[55643]: removing echo
Jan 18 09:59:00 Hortonworks02 xinetd[55643]: removing tcpmux
Jan 18 09:59:00 Hortonworks02 xinetd[55643]: removing time
Jan 18 09:59:00 Hortonworks02 xinetd[55643]: removing time
Jan 18 09:59:00 Hortonworks02 xinetd[55643]: xinetd Version 2.3.15 started with libwrap loadavg labeled-networking option…ed in.
Jan 18 09:59:00 Hortonworks02 xinetd[55643]: Started working: 0 available services
Jan 18 09:59:00 Hortonworks02 systemd[1]: Started Xinetd A Powerful Replacement For Inetd.
Hint: Some lines were ellipsized, use -l to show in full.

測試telnet

[[email protected] ~]# telnet localhost
Trying ::1…
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1…
telnet: connect to address 127.0.0.1: Connection refused

並沒有連線成功。

檢視23埠是否能用

[[email protected] ~]# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:8010 0.0.0.0:* LISTEN 52726/java
tcp 0 0 0.0.0.0:6188 0.0.0.0:* LISTEN 6119/java
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd
tcp 0 0 0.0.0.0:19888 0.0.0.0:* LISTEN 56810/java
tcp 0 0 0.0.0.0:10033 0.0.0.0:* LISTEN 56810/java
tcp 0 0 0.0.0.0:4242 0.0.0.0:* LISTEN 53113/jsvc.exec
tcp 0 0 127.0.0.1:41972 0.0.0.0:* LISTEN 52726/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1175/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1785/master
tcp 0 0 0.0.0.0:50010 0.0.0.0:* LISTEN 52726/java
tcp 0 0 0.0.0.0:50075 0.0.0.0:* LISTEN 52726/java
tcp 0 0 0.0.0.0:8670 0.0.0.0:* LISTEN 2229/python
tcp 0 0 0.0.0.0:50079 0.0.0.0:* LISTEN 53113/jsvc.exec
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN 53113/jsvc.exec
tcp 0 0 0.0.0.0:10020 0.0.0.0:* LISTEN 56810/java
tcp 0 0 0.0.0.0:60200 0.0.0.0:* LISTEN 6119/java
tcp6 0 0 :::8042 :::* LISTEN 54539/java
tcp6 0 0 10.0.13.72:6667 :::* LISTEN 4481/java
tcp6 0 0 10.0.13.72:45580 :::* LISTEN 9540/java
tcp6 0 0 :::39692 :::* LISTEN 4481/java
tcp6 0 0 :::45454 :::* LISTEN 54539/java
tcp6 0 0 :::111 :::* LISTEN 1/systemd
tcp6 0 0 10.0.13.72:3888 :::* LISTEN 2778/java
tcp6 0 0 :::80 :::* LISTEN 995/httpd
tcp6 0 0 :::46386 :::* LISTEN 2778/java
tcp6 0 0 10.0.13.72:39987 :::* LISTEN 9540/java
tcp6 0 0 10.0.13.72:40563 :::* LISTEN 6072/java
tcp6 0 0 10.0.13.72:16020 :::* LISTEN 46355/java
tcp6 0 0 :::42837 :::* LISTEN 6072/java
tcp6 0 0 :::22 :::* LISTEN 1175/sshd
tcp6 0 0 :::7447 :::* LISTEN 54539/java
tcp6 0 0 ::1:25 :::* LISTEN 1785/master
tcp6 0 0 :::13562 :::* LISTEN 54539/java
tcp6 0 0 127.0.0.1:44444 :::* LISTEN 40547/java
tcp6 0 0 :::8765 :::* LISTEN 46639/java
tcp6 0 0 :::61181 :::* LISTEN 6072/java
tcp6 0 0 :::16030 :::* LISTEN 46355/java
tcp6 0 0 :::61310 :::* LISTEN 6072/java
tcp6 0 0 10.0.13.72:41726 :::* LISTEN 6072/java
tcp6 0 0 :::10016 :::* LISTEN 9540/java
tcp6 0 0 :::2181 :::* LISTEN 2778/java
tcp6 0 0 :::8999 :::* LISTEN 5674/java
tcp6 0 0 :::8040 :::* LISTEN 54539/java
tcp6 0 0 :::4040 :::* LISTEN 9540/java
tcp6 0 0 :::7337 :::* LISTEN 54539/java
udp 0 0 127.0.0.1:40 0.0.0.0:* 53113/jsvc.exec
udp 0 0 0.0.0.0:111 0.0.0.0:* 2480/rpcbind
udp 0 0 10.0.13.72:123 0.0.0.0:* 62181/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 62181/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 62181/ntpd
udp 0 0 0.0.0.0:959 0.0.0.0:* 2480/rpcbind
udp 0 0 0.0.0.0:4242 0.0.0.0:* 53113/jsvc.exec
udp6 0 0 :::111 :::* 2480/rpcbind
udp6 0 0 ::1:123 :::* 62181/ntpd
udp6 0 0 fe80::21d:d8ff:feb7:123 :::* 62181/ntpd
udp6 0 0 :::123 :::* 62181/ntpd
udp6 0 0 :::959 :::* 2480/rpcbind

可以看到,tcp並沒有23埠。

開放23埠

[[email protected] xinetd.d]# firewall-cmd –zone=public –add-port=23/tcp –permanent
success
[[email protected] xinetd.d]# firewall-cmd –reload
success

檢視修改是否生效

[[email protected] xinetd.d]# firewall-cmd –zone=public –query-port=23/tcp
yes

再進行telnet測試

[[email protected] xinetd.d]# telnet localhost
Trying ::1…
Connected to localhost.
Escape character is ‘^]’.
Kernel 3.10.0-514.el7.x86_64 on an x86_64
Hortonworks02 login: root
Password:
Login incorrect

一直提示密碼不正確。
註釋/etc/pam.d/remote的第一行

再次測試

[[email protected] xinetd.d]# telnet localhost 23
Trying ::1…
Connected to localhost.
Escape character is ‘^]’.
Kernel 3.10.0-514.el7.x86_64 on an x86_64
Hortonworks02 login: root
Password:
Last login: Thu Jan 18 10:33:29 from localhost

終於成功了。

相關推薦

CentOS7 安裝telnet服務

centos7 info 安裝 idt blog input -m https nss 今天搞了下 Centos 7 下面升級 openssl 和 openssh ,順便裝了下 telnet# 安裝 telnet 避免 ssh 無法登錄yum -y install xine

centos7安裝telnet服務

先檢視是否安裝Telnet [[email protected] ~]# rpm -qa | grep telnet telnet-server-0.17-64.el7.x86_64 telnet-0.17-64.el7.x86_6

CentOS-Minimal版本安裝telnet服務和xinetd服務

password col con note chkconfig 文件表 stat ini systemctl 默認在CentOS-Minimal版本下沒有安裝telnet和xinetd服務。 1、安裝telnet [root@localhost ~]# rpm -qa |

CentOS 7 LINUX安裝telnet服務

mct 安裝 註冊 openss centos 7 con oot soc add 在CentOS 7 下升級了 openssl 和 openssh ,順便裝了下 telnet服務。# 安裝 telnet 避免 ssh 無法登錄yum -y install xinetd t

CentOS7安裝memcached服務

首先下載memcached wget http://www.memcached.org/files/memcached-1.5.9.tar.gz 安裝前需要先安裝libevent yum -y install libevent libevent-devel #解壓 tar zxvf

Centos7安裝FastDFS服務

  1、安裝FastDFS服務的依賴 1.1、安裝GCC依賴 GCC用來對C語言程式碼進行編譯執行 [[email protected] soft]# yum install -y gcc 1.2、安裝unzip工具 unzip工具可以幫助我們對壓縮包進行

Linux CentOS7安裝Redis服務

#下載 wget http://download.redis.io/releases/redis-5.0.2.tar.gz #解壓 tar zxvf redis-5.0.2.tar.gz cd redis-5.0.2 make mkdir -p /usr/local/redis/bin cd

用Xshell在centos7安裝lnmp服務

虛擬機器已建立好,本機已安裝Xshell 一、準備工作:安裝常用工具 1.1  yum install -y vim 備註:-y是同意安裝過程中的詢問,不被詢問打斷安裝 vim:vim是一個類似於Vi的著名的功能強大、高度可定製的文字編輯器,在Vi的基礎上改進和增加了很多特性 1.2&nb

centos7安裝git服務端,並自動更新到web目錄

1.伺服器安裝git ①yum安裝 [[email protected] home]#yum install -y git ②檢視版本 [[email protected] home]# git --version git version 1.7.1 2.建立git使用者

Linux學習筆記010---CentOS7安裝FTP服務

按照這個就可以 1、安裝vsftp 1.1、安裝vsftp,測試安裝的vsftpd的版本是:vsftpd.x86_64 0:3.0.2-11.el7_2 yum -y install vsftpd 1.2、修改配置檔案 vi /etc/vsftpd/vsftpd

centos7安裝telnet伺服器

1.檢查是否已經安裝telnet                              rpm -qa | grep telnet 2.安裝telnet,telnet服務要依靠xinetd服務啟動,所以要先安裝xinetd服務。所以我們要先安裝xinetd,再安裝te

CentOS7安裝Redis服務

1、檢視Redis安裝源yum search redisLoaded plugins: fastestmirror Loading mirror speeds from cached hostfile =====================================

CentOS安裝Telnet服務

啟動 服務端 inf -s tel 開放 端口 save art 環境:centos6.6 IP:172.18.0.190 1、查看是否安裝Telnet: rpm -qa telnet-server rpm -qa xinetd 2、安裝Telnet

【CNMP系列】CentOS7.0安裝Nginx服務

系統資源 for proxy input strong network emc -c .com 話步前言,CNMP之路,系統起步:http://www.cnblogs.com/riverdubu/p/6425028.html 這回我來講解下CentOS7.0下如何安裝和配置

CentOS7安裝配置流媒體服務器Red5

linux 流媒體 centos red 背景:因工作需要,要研究一些流媒體服務器相關的技術,主要是為了搭建直播所用的服務器,本文是基於CentOS7搭建Red5流媒體服務器,利用OBS推流工具可實現簡單的直播、觀看功能。下載我們可以直接從github官網下載最新版本的Red5-server,

centos7安裝telnet服務

inetd spa emc start xinetd服務 blog net style 安裝 1.檢查當前系統是否已經安裝telnet-server和xinetd,如安裝可忽略。 rpm -qa telnet-serverrpm -qa xinetd 2.安裝telne

【轉載】CentOS7.0安裝Telnet

soc nbsp 裝包 正常 system 關閉防火墻 blog 不能 service 1.、先檢查CentOS7.0是否已經安裝以下兩個安裝包:telnet-server、xinetd。命令如下: # rpm -qa telnet-server # rpm -qa xin

Linux CentOS7安裝Zookeeper-3.4.10服務(最新)

pre exp 路徑 datadir detail count 3.4 repr 數據文件 Linux CentOS7下安裝Zookeeper-3.4.10服務(最新) 2017年10月27日 01:25:26 極速-蝸牛 閱讀數:1933 版權聲明:

CentOS7 安裝 Nginx 支援 HTTPS 並設定為系統服務

1、安裝 yum install -y gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel wget https://nginx.org/download/nginx-1.15.1.tar.gz tar zxvf nginx

測試服務搭建之centos7安裝java

一 安裝Java 1 建立普通使用者 useradd userNameTest passwd userNameTest 提示輸入密碼:【輸入wujian的密碼】 user:userNameTest group:root passwd:123456789 2 給