1. 程式人生 > >windows下遠端桌面連線centos

windows下遠端桌面連線centos

最近,由於專案需要,必須要在centos下進行操作。習慣了圖形介面的我,通過黑框框來遠端操作伺服器,著實讓人難受。但是,windows自帶的遠端桌面工具貌似不能直接連centos。所以,只能藉助其他工具來實現這一目的。好了,廢話不多說,下面,就把我的成功方案總結一下。
注:centos版本為7,windows版本為8

1.伺服器端(centos)

安裝元件

yum install -y vnc-server

配置檔案

[root@localhost /]# cp /lib/systemd/system/vncserver@:.service /etc/systemd/system
/vncserver@:1.service [root@localhost /]# gedit /etc/systemd/system/vncserver@:1.service

檔案[email protected]:1.service的內容:

# The vncserver service unit file
#
# Quick HowTo:
# 1. Copy this file to /etc/systemd/system/[email protected]
# 2. Edit <USER> and vncserver parameters appropriately
#   ("runuser -l <USER> -c /usr/bin/vncserver %i -arg1 -arg2")
# 3. Run `systemctl daemon-reload` # 4. Run `systemctl enable [email protected]:<display>.service` # # DO NOT RUN THIS SERVICE if your local area network is # untrusted! For a secure way of using VNC, you should # limit connections to the local host and then tunnel from # the machine you want to view VNC on (host A) to the machine
# whose VNC output you want to view (host B) # # [[email protected] ~]$ ssh -v -C -L 590N:localhost:590M hostB # # this will open a connection on port 590N of your hostA to hostB's port 590M # (in fact, it ssh-connects to hostB and then connects to localhost (on hostB). # See the ssh man page for details on port forwarding) # # You can then point a VNC client on hostA at vncdisplay N of localhost and with # the help of ssh, you end up seeing what hostB makes available on port 590M # # Use "-nolisten tcp" to prevent X connections to your VNC server via TCP. # # Use "-localhost" to prevent remote VNC clients connecting except when # doing so through a secure tunnel. See the "-via" option in the # `man vncviewer' manual page. [Unit] Description=Remote desktop service (VNC) After=syslog.target network.target [Service] Type=forking # Clean any existing files in /tmp/.X11-unix environment ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' ExecStart=/usr/sbin/runuser -l admin -c "/usr/bin/vncserver %i" PIDFile=/home/admin/.vnc/%H%i.pid ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' [Install] WantedBy=multi-user.target

需要修改的部分:

[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/sbin/runuser -l <User> -c "/usr/bin/vncserver %i"
PIDFile=/home/<User>/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'

把這部分中的<User>都改成admin,即遠端登入的使用者名稱

重新載入[email protected]:1.service

[root@localhost /]# systemctl daemon-reload

設定密碼

[root@localhost /]# vncpasswd

設定開機啟動

[root@localhost /]# systemctl enable [email protected]:1.service

啟動服務

[root@localhost /]# systemctl start [email protected]:1.service

防火牆設定

關閉防火牆

[root@localhost /]# systemctl stop firewalld

OR
新增埠
這裡寫圖片描述

關閉服務

[root@localhost /]# vncserver -kill :1

2.客戶端(windows)

檔案下載

軟體配置

這裡寫圖片描述
這裡寫圖片描述
這裡寫圖片描述
這裡寫圖片描述
這裡寫圖片描述

相關推薦

windows遠端桌面連線centos

最近,由於專案需要,必須要在centos下進行操作。習慣了圖形介面的我,通過黑框框來遠端操作伺服器,著實讓人難受。但是,windows自帶的遠端桌面工具貌似不能直接連centos。所以,只能藉助其他工具來實現這一目的。好了,廢話不多說,下面,就把我的成功方案總結

Windows遠端桌面連線 CentOS 6

用Windows 的遠端桌面連線 CentOS 6   我們購買遠端的Linux CentosVPS主機如何遠端登入操作?   如果手頭的是windows電腦,遠端的是centos系統,一般可以這麼操作:   一般

Linux遠端桌面連線windows

下面來看一下rdesktop怎麼使用吧,開個終端吧 $info rdesktop //看一下幫助資訊吧 $rdesktop 192.168.1.1 //打開了一個8位色彩的, $rdesktop -a 16 192.168.1.1 //這個是16位色彩的了,看起來好多了 $rdesktop -u admi

windows遠端桌面連線CentOS系統

CentOS安裝桌面,如果無桌面,請執行# yum -y groups install "GNOME Desktop" # startx12配置源# yum install epel* -y1安裝xrdp# yum --enablerepo=epel -y install

win7 遠端桌面連線centos 6.5

首先安裝tigervnc-server: yum install tigervnc-server 安裝好後,設定 vi /etc/sysconfig/vncservers [[email protected]001 ~]# cat /etc/

windows 7 遠端桌面連線虛擬機器中的 xp

windows遠端桌面連線主要的設定步驟如下:      1》在xp中建立遠端使用者(可遠端的登陸的使用者,必須設定登入密碼)          控制面板-->使用者賬戶-->選擇一個使用者(也可重新建立使用者)-->建立密碼     2》開啟xp的

linux 遠端桌面連線

使用Tiger-VNC實現Linux遠端桌面連線出於工作需要,有時我們要把Linux桌面共享給其他同事,或者遠端控制自己的電腦。本文將演示如何使用Tiger-VNC實現Linux遠端桌面連線。安裝Tiger-VNC:Tiger-VNC分為服務端和客戶端兩部分。提供服務的電腦(

windows使用遠端桌面連線到linux

閒來無事就玩起了伺服器,因為沒有信用卡所以沒有使用免費的asw,於是花了一點錢在目前流行的阿里雲上買了個雲伺服器,雲伺服器ECS的版本我是選擇的ubuntu 16.04 64位,因為有過把玩linux的經驗,所以操作起來也沒太大問題,開始遠端桌面連線的時候報了個錯誤,我以為是

rdesktop是linux支援Windows遠端桌面連線的客戶端程式

更多引數: 1、使用 -f 引數進入全屏模式,中途可使用Ctrl+Alt+Enter組合鍵退出全屏; 2、-r disk:share_name=/local-disk 將本地磁碟對映到遠端電腦,其中share_name為顯示名稱,可自定義,local-disk表示本地linux的一個目錄,比如 /da

Windows使用VNC連線CentOS7遠端桌面

在實際維護遠端linux伺服器主機時,有時候純命令列模式可能無法滿足我們的需要,這時候需要使用遠端主機的GUI模式,即能看到伺服器的桌面,一般會使用兩種方式:Xmanager或者VNC。我一開始使用的是Xmanager,版本是Xmanager5 Enterpri

windows遠端連線Linux桌面

在windows下使用vnc viewer遠端連線Linux桌面,主要配置步驟: Linux: 1.rpm -qa vnc //檢視是否安裝vnc服務,如果沒有安裝,可以使用yum,或者rpm進行安裝 2.修改配置檔案: vim /etc/sysconfig/vncse

本地Windows遠端桌面連線阿里雲Ubuntu伺服器

本地Windows遠端桌面連線阿里雲Ubuntu 16.04伺服器:   1、目的:希望通過本地的Windows遠端桌面連線到阿里雲的Ubuntu伺服器,通過遠端桌面圖形介面的方式操作伺服器。 2、條件:申請的阿里雲Ubuntu伺服器一臺,本地Windows作業系統電腦一臺。  

Windows XP SP3也支援多使用者遠端桌面連線

遠端桌面連線的確很方便,但是在Windows XP中只支援單一使用者的連線,當第二個使用者連線時,第一個使用者就被迫斷開並回到使用者登入介面了,這可和多工的作業系統理念不符啊,或許微軟是為了突出Server系統的特點吧!   不過沒關係,網上早就有用2055測試版的termsrv.dll替

開啟遠端桌面連線windows的方法以及遇到的問題

確認電腦的遠端服務是否已經開啟 開始--執行--輸入“services.msc ”,開啟服務,找到三個remote desktop開頭的服務 Remote Desktop Configuration、 Remote Desktop Services、 Remote Desktop Services U

遠端連線伺服器:提示身份驗證錯誤 要求的函式不受支援 Windows遠端桌面連線

之前好好的能遠端桌面連線到伺服器,但是今天來就不能連線上了,並提示:身份驗證錯誤。要求的函式不受支援。猜想可能是Windows又更新了什麼鬼,後面查詢資料知道是由於CredSSP加密Oracle修正的原因,這裡我整理了下解決方案,希望能幫到你。 微軟給出解決方案: h

Ubuntu 14.04 + xRDP + Xfce 實現Windows遠端桌面連線

Ubuntu 14.04 + xRDP + Xfce 實現Windows遠端桌面連線 1. 安裝xRDP及vncserver sudo apt-get install xrdp sudo apt-get install vnc4server tightvncserver&n

遠端桌面連線windows server :出現身份驗證錯誤,要求的函式不受支援(這可能是由於CredSSP加密Oracle修正)

當你想要連線到windows server 遠端伺服器時,出現了這個。 首先,你要知道,這個圖示不是因為遠端伺服器為了保護自己而拒絕你,而是你的電腦為了保護自己,而且覺得你傻,防止你做stupid things. 所以,你需要更改的不是伺服器,也不要找你的伺服器管理員,自

windows使用scvpn、遠端桌面連線:發生身份驗證錯誤。要求的函式不受支援

【問題出現過程】: 1.使用scvpn (Hillstone Secure Connect )遠端伺服器時,scvpn已經登入成功,連線狀態顯示已連線,如下圖: 2.遠端桌面連線伺服器時候報錯,如下圖: 【原因】: 問題不是出在伺服器,而是在遠端桌面客戶端限制了許可權

[Linux] Windows 和 Linux 遠端桌面連線

[Linux] Win 10 和 CentOS 7 遠端桌面連線 Win 10 遠端連線 CentOS 7 1 通過 ssh 連線命令列介面 在 CentOS 7 中安裝 ssh 服務 在 Win 10 中使用 PuTTY 來通過 ssh 遠端連線 CentOS

Windows 遠端桌面連線Ubuntu16.04影象介面

1、安裝xrdp    sudo apt-get install xrdp  2、安裝vnc4server     sudo apt-get install vnc4server  3、安裝xubuntu-desktop    sudo apt-ge