Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

ssh X-forwarding on headless (no monitor) system [SOLVED]

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
14 posts • Page 1 of 1
Author
Message
tinytim
n00b
n00b
Posts: 19
Joined: Thu Sep 08, 2005 9:05 am

ssh X-forwarding on headless (no monitor) system [SOLVED]

  • Quote

Post by tinytim » Sun Sep 12, 2010 8:58 am

Hi

Not the problem: I have a number of desktop systems running and can ssh between them without any difficulties using ssh -Y . When typing "emacs", for example, the editor opens in a separate window. Fantastic, this is exactly what I want.
Problem: I also have a headless system (no monitor, no keyboard) running to which I can connect via ssh, but cannot get the applications to open in a new window on my desktop (tried xclock and emacs). The sshd_config does contain the line 'X11Forwarding yes' all other options were left default (openssh-5.5_p1-r2) (this works fine for connecting to the other desktops)

Use flags on the headless system have X enabled, Xorg-server is installed and I even tried installing twm and xterm in frustration trying to get any kind of X-response from the system.

oh, and starting xdm does not help either as Xorg dies on me with a "Fatal server error:no screens found"; but that is more or less expected on a headless system. The question here is do I need to start xdm at all?

I suppose I am missing some key package or service or forgetting to start sth. critical, but which and how?
Last edited by tinytim on Sun Sep 12, 2010 10:12 am, edited 1 time in total.
Top
Kobboi
l33t
l33t
User avatar
Posts: 673
Joined: Fri Jul 29, 2005 6:05 pm
Location: Belgium

  • Quote

Post by Kobboi » Sun Sep 12, 2010 9:18 am

No, I have just turned off X on my remote system and was able to run its xclock on my laptop.
Top
vivaceious
n00b
n00b
Posts: 31
Joined: Wed Sep 08, 2010 7:06 am
Location: San Francisco, USA

  • Quote

Post by vivaceious » Sun Sep 12, 2010 9:21 am

can you ssh -Yv and see if the verbose option gives any additional output that might clue you in as to what's going on? :)
i also confirmed Kobboi's findings just now
Top
tinytim
n00b
n00b
Posts: 19
Joined: Thu Sep 08, 2005 9:05 am

  • Quote

Post by tinytim » Sun Sep 12, 2010 9:21 am

great. so xdm is not needed as a service for x-forwarding to work.

then the question remains: How do I get X-forwarding to work from the headless system?
Top
tinytim
n00b
n00b
Posts: 19
Joined: Thu Sep 08, 2005 9:05 am

  • Quote

Post by tinytim » Sun Sep 12, 2010 9:27 am

the output of ssh -YV does not seem to give me any clues, but here it is in case I missed sth.

Code: Select all

OpenSSH_5.3p1, OpenSSL 0.9.8n 24 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to xxx.xxx.xxx.xxx port 22.
debug1: Connection established.
debug1: identity file /home/name/.ssh/identity type -1
debug1: identity file /home/name/.ssh/id_rsa type -1
debug1: identity file /home/name/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5
debug1: match: OpenSSH_5.5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'xxx.xxx.xxx.xxx' is known and matches the RSA host key.
debug1: Found key in /home/name/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/name/.ssh/identity
debug1: Trying private key: /home/name/.ssh/id_rsa
debug1: Trying private key: /home/name/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password: 
debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Requesting X11 forwarding with authentication spoofing.
Last login: Sun Sep 12 12:36:58 CEST 2010 from xxx.xxx.xxx.xxx on pts/1
Top
Kobboi
l33t
l33t
User avatar
Posts: 673
Joined: Fri Jul 29, 2005 6:05 pm
Location: Belgium

  • Quote

Post by Kobboi » Sun Sep 12, 2010 9:28 am

Did you set the display offset in sshd_config?
Top
vivaceious
n00b
n00b
Posts: 31
Joined: Wed Sep 08, 2010 7:06 am
Location: San Francisco, USA

  • Quote

Post by vivaceious » Sun Sep 12, 2010 9:29 am

oh oops after you've opened the ssh connection with -v, you might then try to run xclock or *any* X application and see what the verbose option spits out at you in the way of extra errors?
sorry I'm stabbing in the dark as I'm relatively new to X11 forwarding over SSH

also: did u try to change the X11UseLocalHost option? i *think* that option is about correcting for some kind of error
Top
tinytim
n00b
n00b
Posts: 19
Joined: Thu Sep 08, 2005 9:05 am

  • Quote

Post by tinytim » Sun Sep 12, 2010 9:35 am

Kobboi

The default setting (and I use that) is: X11DisplayOffset 10

vivaceious

trying this for emacs the output is:

Code: Select all

Home$ ssh -Yv root@headless emacs
OpenSSH_5.3p1, OpenSSL 0.9.8n 24 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to xxx.xxx.xxx.xxx port 22.
debug1: Connection established.
debug1: identity file /home/name/.ssh/identity type -1
debug1: identity file /home/name/.ssh/id_rsa type -1
debug1: identity file /home/name/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5
debug1: match: OpenSSH_5.5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'xxx.xxx.xxx.xxx' is known and matches the RSA host key.
debug1: Found key in /home/name/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/name/.ssh/identity
debug1: Trying private key: /home/name/.ssh/id_rsa
debug1: Trying private key: /home/name/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password: 
debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: Sending command: emacs
emacs: standard input is not a ttydebug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 1552, received 2104 bytes, in 0.0 seconds
Bytes per second: sent 155463.3, received 210757.0
debug1: Exit status 1
So here a bit of sth. does happen, but the output is perfectly cryptic to me. I hope it means a bit more to you.

...and the X11UseLocalhost option is on by default (but now I set it explicitly --> no change)
Top
vivaceious
n00b
n00b
Posts: 31
Joined: Wed Sep 08, 2010 7:06 am
Location: San Francisco, USA

  • Quote

Post by vivaceious » Sun Sep 12, 2010 9:43 am

maybe something is hindering the DISPLAY variable?

Code: Select all

$ env | grep DISPLAY
OR try manually

Code: Select all

$ DISPLAY=localhost:10.0 emacs
last random thought before bed.... sorry i'm not much help lol
Top
tinytim
n00b
n00b
Posts: 19
Joined: Thu Sep 08, 2005 9:05 am

  • Quote

Post by tinytim » Sun Sep 12, 2010 9:47 am

...
DISPLAY is not set on the headless system, setting it manually via 'export DISPLAY=localhost:0.0' does not help either. After that the DISPLAY is set, but emacs still only appears on the commend line and not in a separate window.
...and I get a message telling me :

Code: Select all

Display localhost:0.0 unavailable, simulating -nw
(but how to resolve that is probably the whole crux of the problem)

Thanks for the try anyway, at least I have other people who share my ignorance partially :-)
Top
vivaceious
n00b
n00b
Posts: 31
Joined: Wed Sep 08, 2010 7:06 am
Location: San Francisco, USA

  • Quote

Post by vivaceious » Sun Sep 12, 2010 9:50 am

setting it manually via 'export DISPLAY=localhost:0.0' does not help
naturally it wouldn't, since your X11 Display Offset is set to 10 by default...

Code: Select all

$ export DISPLAY=localhost:10.0
$ emacs
:) maybe
Top
tinytim
n00b
n00b
Posts: 19
Joined: Thu Sep 08, 2005 9:05 am

  • Quote

Post by tinytim » Sun Sep 12, 2010 9:54 am

using export DISPLAY=localhost:10.0 I get the same thing

Code: Select all

Display localhost:10.0 unavailable, simulating -nw
Top
tinytim
n00b
n00b
Posts: 19
Joined: Thu Sep 08, 2005 9:05 am

  • Quote

Post by tinytim » Sun Sep 12, 2010 10:12 am

Ok, that is a bit disappointing...

A reboot of the system fixed the problem. (Sometimes the approach for solving "windows problems" does work for linux too) now everything works as it should.
Top
Kobboi
l33t
l33t
User avatar
Posts: 673
Joined: Fri Jul 29, 2005 6:05 pm
Location: Belgium

  • Quote

Post by Kobboi » Sun Sep 12, 2010 11:08 am

tinytim wrote:Ok, that is a bit disappointing...

A reboot of the system fixed the problem. (Sometimes the approach for solving "windows problems" does work for linux too) now everything works as it should.
Maybe you changed the sshd configuration without restarting it? Anyway, glad it works now.
Top
Post Reply

14 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic