2016-01-21 20 views
6

मेरे पास एक वीपीएस है जो ओएस CentOS6.3 है। मैं PUTTY और Xming के माध्यम से startx चलाने के लिए चाहता हूँ।फॉरवर्ड एक्स 11 असफल: नेटवर्क त्रुटि: कनेक्शन से इनकार कर दिया

PuTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused 

पूरे हालत:

Welcome to the Xming X Server 
Vendor: Colin Harrison 
Release: 6.9.0.31 
FreeType2: 2.3.4 
Contact: http://sourceforge.net/forum/?group_id=156984 

Xming :10 -multiwindow -clipboard 

XdmcpRegisterConnection: newAddress 192.168.139.1 
winAdjustVideoModeShadowGDI - Using Windows display depth of 32 bits per pixel 
winAllocateFBShadowGDI - Creating DIB with width: 1366 height: 768 depth: 32 
winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32 
glWinInitVisuals:1596: glWinInitVisuals 
glWinInitVisualConfigs:1503: glWinInitVisualConfigs glWinSetVisualConfigs:1581: glWinSetVisualConfigs 
init_visuals:1055: init_visuals 
null screen fn ReparentWindow 
null screen fn RestackWindow 
InitQueue - Calling pthread_mutex_init 
InitQueue - pthread_mutex_init returned 
InitQueue - Calling pthread_cond_init 
InitQueue - pthread_cond_init returned 
winInitMultiWindowWM - Hello 
winInitMultiWindowWM - Calling pthread_mutex_lock() 
winMultiWindowXMsgProc - Hello 
winMultiWindowXMsgProc - Calling pthread_mutex_lock() 
glWinScreenProbe:1390: glWinScreenProbe 
fixup_visuals:1303: fixup_visuals 
init_screen_visuals:1336: init_screen_visuals 
(--) 5 mouse buttons found 
(--) Setting autorepeat to delay=500, rate=31 
(--) winConfigKeyboard - Layout: "00000804" (00000804) 
(EE) Keyboardlayout "Chinese (Simplified) - US Keyboard" (00000804) is unknown 
Could not init font path element D:\Program Files (x86)\Xming/fonts/misc/, removing from list! 
Could not init font path element D:\Program Files (x86)\Xming/fonts/TTF/, removing from list! 
Could not init font path element D:\Program Files (x86)\Xming/fonts/Type1/, removing from list! 
Could not init font path element D:\Program Files (x86)\Xming/fonts/75dpi/, removing from list! 
Could not init font path element D:\Program Files (x86)\Xming/fonts/100dpi/, removing from list! 
Could not init font path element C:\Program Files\Xming\fonts\dejavu, removing from list! 
Could not init font path element C:\Program Files\Xming\fonts\cyrillic, removing from list! 
Could not init font path element C:\WINDOWS\Fonts, removing from list! 
winInitMultiWindowWM - pthread_mutex_lock() returned. 
winInitMultiWindowWM - pthread_mutex_unlock() returned. 
winInitMultiWindowWM - DISPLAY=127.0.0.1:10.0 
winMultiWindowXMsgProc - pthread_mutex_lock() returned. 
winMultiWindowXMsgProc - pthread_mutex_unlock() returned. 
winMultiWindowXMsgProc - DISPLAY=127.0.0.1:10.0 
winProcEstablishConnection - Hello 
winInitClipboard() 
winProcEstablishConnection - winInitClipboard returned. 
winClipboardProc - Hello 
DetectUnicodeSupport - Windows Vista 
winClipboardProc - DISPLAY=127.0.0.1:10.0 
winInitMultiWindowWM - XOpenDisplay() returned and successfully opened the display. 
winMultiWindowXMsgProc - XOpenDisplay() returned and successfully opened the display. 
winClipboardProc - XOpenDisplay() returned and successfully opened the display. 

यहाँ VPS पर मेरी sshd_config है:

Using username "root". 
Authenticating with public key "rsa-key-20150906" from agent 
Last login: Thu Jan 21 13:53:40 2016 from 222.222.150.82 
[[email protected] ~]# xhost + 
PuTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused 
xhost: unable to open display "localhost:10.0" 
[[email protected] ~]# echo $DISPLAY 
localhost:10.0 
[[email protected] ~]# gedit 
PuTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused 
(gedit:6287): Gtk-WARNING **: cannot open display: localhost:10.0 
[[email protected] ~]# 

और यहाँ Xming लॉग है

लेकिन, यह इस त्रुटि पैदा करता है:

# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $ 

# This is the sshd server system-wide configuration file. See 
# sshd_config(5) for more information. 

# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin 

# The strategy used for options in the default sshd_config shipped with 
# OpenSSH is to specify options with their default value where 
# possible, but leave them commented. Uncommented options change a 
# default value. 

#Port 22 
#AddressFamily any 
#ListenAddress 0.0.0.0 
#ListenAddress :: 

# Disable legacy (protocol version 1) support in the server for new 
# installations. In future the default will change to require explicit 
# activation of protocol 1 
Protocol 2 

# HostKey for protocol version 1 
#HostKey /etc/ssh/ssh_host_key 
# HostKeys for protocol version 2 
#HostKey /etc/ssh/ssh_host_rsa_key 
#HostKey /etc/ssh/ssh_host_dsa_key 

# Lifetime and size of ephemeral version 1 server key 
#KeyRegenerationInterval 1h 
#ServerKeyBits 1024 

# Logging 
# obsoletes QuietMode and FascistLogging 
#SyslogFacility AUTH 
SyslogFacility AUTHPRIV 
#LogLevel INFO 

# Authentication: 

#LoginGraceTime 2m 
#PermitRootLogin yes 
#StrictModes yes 
#MaxAuthTries 6 
#MaxSessions 10 

#RSAAuthentication yes 
#PubkeyAuthentication yes 
#AuthorizedKeysFile .ssh/authorized_keys 
#AuthorizedKeysCommand none 
#AuthorizedKeysCommandRunAs nobody 

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts 
#RhostsRSAAuthentication no 
# similar for protocol version 2 
#HostbasedAuthentication no 
# Change to yes if you don't trust ~/.ssh/known_hosts for 
# RhostsRSAAuthentication and HostbasedAuthentication 
#IgnoreUserKnownHosts no 
# Don't read the user's ~/.rhosts and ~/.shosts files 
#IgnoreRhosts yes 

# To disable tunneled clear text passwords, change to no here! 
#PasswordAuthentication yes 
#PermitEmptyPasswords no 
PasswordAuthentication yes 

# Change to no to disable s/key passwords 
#ChallengeResponseAuthentication yes 
ChallengeResponseAuthentication no 

# Kerberos options 
#KerberosAuthentication no 
#KerberosOrLocalPasswd yes 
#KerberosTicketCleanup yes 
#KerberosGetAFSToken no 
#KerberosUseKuserok yes 

# GSSAPI options 
#GSSAPIAuthentication no 
GSSAPIAuthentication yes 
#GSSAPICleanupCredentials yes 
GSSAPICleanupCredentials yes 
#GSSAPIStrictAcceptorCheck yes 
#GSSAPIKeyExchange no 

# Set this to 'yes' to enable PAM authentication, account processing, 
# and session processing. If this is enabled, PAM authentication will 
# be allowed through the ChallengeResponseAuthentication and 
# PasswordAuthentication. Depending on your PAM configuration, 
# PAM authentication via ChallengeResponseAuthentication may bypass 
# the setting of "PermitRootLogin without-password". 
# If you just want the PAM account and session checks to run without 
# PAM authentication, then enable this but set PasswordAuthentication 
# and ChallengeResponseAuthentication to 'no'. 
#UsePAM no 
UsePAM yes 

# Accept locale-related environment variables 
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES 
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT 
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE 
AcceptEnv XMODIFIERS 

#AllowAgentForwarding yes 
#AllowTcpForwarding yes 
GatewayPorts yes 
#X11Forwarding no 
X11Forwarding yes 
#X11DisplayOffset 10 
X11UseLocalhost yes 
#PrintMotd yes 
#PrintLastLog yes 
#TCPKeepAlive yes 
#UseLogin no 
#UsePrivilegeSeparation yes 
#PermitUserEnvironment no 
#Compression delayed 
#ClientAliveInterval 0 
#ClientAliveCountMax 3 
#ShowPatchLevel no 
#UseDNS yes 
#PidFile /var/run/sshd.pid 
#MaxStartups 10:30:100 
#PermitTunnel no 
#ChrootDirectory none 

# no default banner path 
#Banner none 

# override default of no subsystems 
Subsystem sftp /usr/libexec/openssh/sftp-server 

# Example of overriding settings on a per-user basis 
#Match User anoncvs 
# X11Forwarding no 
# AllowTcpForwarding no 
# ForceCommand cvs server 

और मैं X11 अग्रेषण

enter image description here

क्या ऊपर दिए गए जिसके कारण त्रुटि सक्षम है?


न्यू विवरण

जोड़ा @lilydjwg जवाब के अनुसार, मैं "एक्स प्रदर्शन स्थान" से जमा की है और उसके बाद फिर से कोशिश की, लेकिन यह अभी भी गलत है:

enter image description here

Using username "root". 
Authenticating with public key "rsa-key-20150906" from agent 
Last login: Thu Jan 21 22:24:57 2016 from 222.222.150.82 
[[email protected] ~]# echo $DISPLAY 
localhost:10.0 
[[email protected] ~]# gedit 
process 6968: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open"/var/lib/dbus/machine-id": No such file or directory 
See the manual page for dbus-uuidgen to correct this issue. 
    D-Bus not built with -rdynamic so unable to print a backtrace 
Aborted 
[[email protected] ~]# 
+0

नहीं, आप नहीं करते हैं। आप पुट्टी पर 'स्टार्टक्स' नहीं कर सकते हैं। – Jakuje

+0

@Jakuje कोई भी स्टार्टक्स नहीं है, लेकिन जब मैं जीएडिट चलाता हूं, तो यह त्रुटियां भी होती है। – TJM

+0

मुझे लगता है कि आपकी जीएडिट समस्या आपके एक्स कनेक्शन से असंबंधित है। यह एक डी-बस कनेक्शन खोजने में विफल रहता है, जो आमतौर पर आपके विंडो प्रबंधक के साथ शुरू होता है। 'Xclock' जैसी मूलभूत कोशिश करें और देखें कि क्या यह काम करता है। – JvO

उत्तर

12

पुटीटी नहीं मिल सकता है कि आपका एक्स सर्वर कहां है, क्योंकि आपने इसे नहीं बताया था। (लिनक्स पर एसएसएच में यह समस्या नहीं है क्योंकि यह एक्स के तहत चलती है, इसलिए यह सिर्फ उस का उपयोग करती है।) अपने एक्समिंग सर्वर के पते के साथ "एक्स डिस्प्ले लोकेशन" के बाद रिक्त बॉक्स भरें।

वैकल्पिक रूप से, MobaXterm आज़माएं। इसमें एक एक्स सर्वर बनाया गया है।

+1

लेकिन क्या भरना है? इसे 'लोकलहोस्ट: 10' भरें? – TJM

+0

@ टीजेएम बस इसे आजमाएं; यह काम करना चाहिए। – lilydjwg

+0

@ टीजेएम जीएडिट डी-बस का उपयोग कर रहा है ताकि आपको उसे भी आगे बढ़ाना चाहिए। असल में कुछ एप्लिकेशन तब भी काम नहीं करेंगे जब आपने डी-बस अग्रेषित किया है, उदा। जताना। – lilydjwg

1

डी-बस त्रुटि dbus-प्रक्षेपण के साथ ठीक किया जा सकता:

dbus-launch command 
6

अन्य जवाब पुराना, या अधूरे हैं, या बस काम नहीं करते।

आपको GUId प्रोग्राम के लॉन्च को संभालने के लिए होस्ट मशीन पर एक्स -11 सर्वर भी निर्दिष्ट करने की आवश्यकता है। यदि ग्राहक एक विंडोज मशीन Xming स्थापित है। यदि ग्राहक एक लिनक्स मशीन है XQuartz स्थापित करें।

अब मान लीजिए कि यह विंडोज़ लिनक्स से कनेक्ट हो रहा है। आदेश में निम्न उपाय अपनाते हैं पोटीन से अधिक X11 कार्यक्रमों को लॉन्च करने के साथ ही सक्षम होने के लिए:

- Launch XMing on Windows client 
- Launch Putty 
    * Fill in basic options as you know in session category 
    * Connection -> SSH -> X11 
     -> Enable X11 forwarding 
     -> X display location = :0.0 
     -> MIT-Magic-Cookie-1 
     -> X authority file for local display = point to the Xming.exe executable 

बेशक ssh सर्वर डेस्कटॉप शेयरिंग की अनुमति दी जाना चाहिए था "अन्य उपयोगकर्ता अपने डेस्कटॉप देखने की अनुमति दें"।

मोबाएक्सटर और अन्य पूर्ण दूरस्थ डेस्कटॉप प्रोग्राम भी काम करते हैं।

[यदि अभी भी समस्या हो रही है, तो मेरी पूरी मार्गदर्शिका here देखें। ]

-1

आपको एक्सएमिंग जैसे एक्स सर्वर को स्थापित करना चाहिए। और एक्स सर्वर चल रहा है। अपनी पट्टी को इस तरह कॉन्फ़िगर करें: कनेक्शन-डेटा-एसएसएच-एक्स 11-एक्स 11 अग्रेषण सक्षम करें चेक किया जाना चाहिए। और एक्स प्रदर्शन स्थान: लोकलहोस्ट: 0

संबंधित मुद्दे