오랫동안 사용되었던 원격 접속 방법이지만 가장 기본적은 원격 접속 방법이므로 설정해 보았다.
[root@localhost ~]# rpm -qa telnet-server
[root@localhost ~]# dnf -y install telnet-server
[root@localhost ~]# systemctl start telnet.socket
[root@localhost ~]# systemctl status telnet.socket
● telnet.socket - Telnet Server Activation Socket
Loaded: loaded (/usr/lib/systemd/system/telnet.socket; disabled; vendor pres>
Active: active (listening) since Thu 2022-07-21 14:07:00 KST; 9s ago
Docs: man:telnetd(8)
Listen: [::]:23 (Stream)
[root@localhost ~]# adduser teluser
[root@localhost ~]# passwd teluser
teluser 사용자의 비밀 번호 변경 중
새 암호:
새 암호 재입력:
passwd: 모든 인증 토큰이 성공적으로 업데이트 되었습니다.
[root@localhost ~]# firewall-cmd --permanent --add-service=23/tcp
[root@localhost ~]# firewall-cmd --reload
[root@localhost ~]# systemctl enable telnet.socket
[root@localhost ~]# telnet [ip 주소]
[teluser@localhost ~]# whoami
teluser
[teluser@localhost ~]# exit
logout
[root@localhost ~]#
telnet [ip 주소]
localhost login: teluser
Password:
[teluser@localhost ~]# whoami
teluser
ssh는 텔넷의 단점인 보안적인 요소를 강화한 원격 접속 방법이다. 방식은 넬텟과 거의 동일하지만 데이터 전송 시 암호화 한다는 차이점을 확인할 수 있다.
[root@localhost ~]# rpm -qa openssh-server
openssh-server-7.8p1-4.el8.x86_64
[root@localhost ~]# systemctl status sshd
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset>
Active: active (running) since Thu 2022-07-21 14:05:38 KST; 11min ago
[centos@localhost ~]# ssh teluser@[ip 주소]
The authenticity of host 'ip 주소(ip 주소)' can't be established.
ECDSA key fingerprint is SHA256:ad7yaM9TPtJFGM+VYYC2ONE9GN3mpuryKTQCEkCcr3E.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
[teluser@localhost ~]# whoami
teluser
[centos@localhost ~]# ifconfig ens160
ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet [ip 주소] netmask [서브넷마스크] broadcast [브로드캐스트 주소]
PS C:\Users\admin> ssh teluser@ip 주소
The authenticity of host 'ip 주소 (ip 주소)' can't be established.
ECDSA key fingerprint is SHA256:ad7yaM9TPtJFGM+VYYC2ONE9GN3mpuryKTQCEkCcr3E.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'ip 주소' (ECDSA) to the list of known hosts.
teluser@ip 주소's password:
Activate the web console with: systemctl enable --now cockpit.socket
[teluser@localhost ~]$ whoami
telnet
[teluser@localhost ~]$ exit
logout
Connection to 192.168.111.100 closed.
PS C:\Users\admin>
원격 접속 후 CLI 모드에서 접속하고 작업하는 것이 아닌 GUI모드에서 원격 접속하여 작업할 수 있는 환경이다.
[root@localhost ~]# dnf -y install epel-release
[root@localhost ~]# dnf -y install xrdp
[root@localhost ~]# systemctl start xrdp
[root@localhost ~]# systemctl enable xrdp