< centos 에서 기본적으로 ssh 는 설치되어 있다 >
[root@localhost ~]# rpm -qa | grep openssh
openssh-server-6.6.1p1-31.el7.x86_64
openssh-6.6.1p1-31.el7.x86_64
openssh-clients-6.6.1p1-31.el7.x86_64
[root@localhost ~]#
[root@localhost ~]# systemctl status sshd
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset:
enabled)
Active: active (running) since 수 2017-04-05 18:58:09 KST; 2min 35s ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 1488 ExecStart=/usr/sbin/sshd $OPTIONS (code=exited,
status=0/SUCCESS)
Main PID: 1988 (sshd)
CGroup: /system.slice/sshd.service
└─1988 /usr/sbin/sshd
4월 05 18:58:07 localhost.localdomain systemd[1]: Starting OpenSSH server
daemon...
4월 05 18:58:09 localhost.localdomain systemd[1]: PID file /var/run/sshd.pid
not readable ...t.
4월 05 18:58:09 localhost.localdomain sshd[1988]: Server listening on 0.0.0.0
port 22.
4월 05 18:58:09 localhost.localdomain sshd[1988]: Server listening on :: port
22.
4월 05 18:58:09 localhost.localdomain systemd[1]: Started OpenSSH server
daemon.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]#
<방화벽 명령어로 오픈>
[root@localhost ~]# firewall-cmd --add-port=22/tcp --permanent
success
[root@localhost ~]# firewall-cmd --reload
< 방화벽에 ssh 가 오픈 되어 있는지 확인>
[root@localhost ~]# firewall-config
==>기본적으로 설정 되어 있음
*** 클라이언트에서 서버 접속 *****
#ssh teluser@192.168.111.100
[centos@localhost ~]$ ssh teluser@192.168.111.100
The authenticity of host '192.168.111.100 (192.168.111.100)' can't be
established.
ECDSA key fingerprint is 3c:92:af:5b:9e:7b:46:ee:c1:ac:14:52:bb:78:87:c4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.111.100' (ECDSA) to the list of known hosts.
teluser@192.168.111.100's password:
Last login: Mon Apr 3 19:21:40 2017 from ::ffff:192.168.111.133
[teluser@localhost ~]$
< putty 로 접속 확인 >
*** VNC 설치 ***
< VNC 가 설치되어 있는지 확인 >
[root@localhost ~]# rpm -qa |grep tiger
tigervnc-license-1.3.1-9.el7.noarch
tigervnc-server-minimal-1.3.1-9.el7.x86_64
[root@localhost ~]#
=>최소버전 설치로 사용이 어렵다.
< VNC 가 설치 >
[root@localhost ~]# yum -y install tigervnc-server
==> vnc는 사용자를 지정 및 display 번호까지 지정해 줘야 한다.
[root@localhost ~]# cp /lib/systemd/system/vncserver@.service
/etc/systemd/system/vncserver@:1.service
[root@localhost ~]# vi /etc/systemd/system/vncserver@\:1.service
[Unit]
35 Description=Remote desktop service (VNC)
36 After=syslog.target network.target
37
38 [Service]
39 Type=forking
40 # Clean any existing files in /tmp/.X11-unix environment
41 ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 ||
:'
42 ExecStart=/usr/sbin/runuser -l centos -c "/usr/bin/vncserver %i"
43 PIDFile=/home/centos/.vnc/%H%i.pid
44 ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
45
46 [Install]
-- INSERT --
< VNC 방화벽 열기 >
[root@localhost ~]# firewall-config
[root@localhost ~]# su -centos
< VNC 비밀번호 설정 >
[root@localhost ~]# su - centos
마지막 로그인: 수 4월 5 20:24:06 KST 2017 일시 pts/0
[centos@localhost ~]$ vncserver
You will require a password to access your desktops.
Password:111111
Password must be at least 6 characters - try again
Password:111111
Verify:
xauth: file /home/centos/.Xauthority does not exist
New 'localhost.localdomain:1 (centos)' desktop is localhost.localdomain:1
Creating default startup script /home/centos/.vnc/xstartup
Starting applications specified in /home/centos/.vnc/xstartup
Log file is /home/centos/.vnc/localhost.localdomain:1.log
[centos@localhost ~]$
< 클라이언트에서 VNC 접속 >
vnc가 설치 되어 있지않아서 설치해 준다.
[centos@localhost ~]$ su
암호:
[root@localhost centos]# yum -y install tigervnc-server
#vncviewer 192.168.111.100:1
=> 에러
원격접속
확인
댓글 ( 4)
댓글 남기기