IT 용어정리

VNC (Virtual Network Computing, 가상 네트워크 컴퓨팅)

두뚜 2021. 7. 24. 14:38

VNC 설정

서버의 default 환경 자체가 graphical 환경에 연결되어있다
그래픽 화면에서 사용할 수 있게 설치하였는데, 현재는 터미널에서 ssh로 연결해서 CLI 환경으로만 볼 수 있다. 서버를 gui 환경으로 이용하기위해 vnc를 이용한다


설정하는법
https://www.ibm.com/support/pages/how-configure-vnc-server-red-hat-enterprise-linux-8

ssh 접속

환경 확인

vnc 설정

상태 확인

더보기

ll /rtc/systemd/system/default.target

user@user-HP-Laptop-14s-dk0xxx:~/Desktop$ ssh may@182.162.22.7 -p 20000
The authenticity of host '[182.162.22.7]:20000 ([182.162.22.7]:20000)' can't be established.
ECDSA key fingerprint is SHA256:EfMLVzBsSdoJgALwWVNDQwyoSmJUDgmIl900efK0sEs.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[182.162.22.7]:20000' (ECDSA) to the list of known hosts.
may@182.162.22.7's password:
Activate the web console with: systemctl enable --now cockpit.socket

[may@serverhosting22-7 ~]$ vncpasswd
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
A view-only password is not used
[may@serverhosting22-7 ~]$ echo 'session=gnome' > ~/.vnc/config
[may@serverhosting22-7 ~]$ su -
Password:

[root@serverhosting22-7 ~]# echo ':3=may' >> /etc/tigervnc/vncserver.users
[root@serverhosting22-7 ~]# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:3.service
[root@serverhosting22-7 ~]# firewall-cmd --permanent --zone=public --add-port 5903/tcp
success
[root@serverhosting22-7 ~]# firewall-cmd --reload
success
[root@serverhosting22-7 ~]# systemctl enable vncserver@:3.service
Created symlink /etc/systemd/system/multi-user.target.wants/vncserver@:3.service → /etc/systemd/system/vncserver@:3.service.
[root@serverhosting22-7 ~]# systemctl start vncserver@:3.service
Job for vncserver@:3.service failed because the control process exited with error code.
See "systemctl status vncserver@:3.service" and "journalctl -xe" for details.
[root@serverhosting22-7 ~]# systemctl status vncserver@\:3.service
● vncserver@:3.service - Remote desktop service (VNC)



VNC 접속

Remmina, real vnc 등 사용

더보기

[may@serverhosting22-6 ~]$ loginctl show-session 1
Id=1
User=1001
Name=may
Timestamp=Sat 2021-07-24 13:47:56 KST
TimestampMonotonic=4128619
VTNr=0
Display=:3
Remote=yes
RemoteHost=203.0.113.20
Service=tigervnc
Scope=session-1.scope
Leader=1489
Audit=1
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=1627104282174676
IdleSinceHintMonotonic=2209491289
LockedHint=no