View previous topic :: View next topic |
Author |
Message |
kaworu Guru
Joined: 07 Dec 2005 Posts: 450
|
Posted: Wed Mar 22, 2006 11:27 pm Post subject: [ssh] X11 forwarding (résolu) |
|
|
bonsoir !
je me connecte en SSH avec mon laptop sur mon PC (de chez moi) et sur les serveurs de l'uni.
lorsque je le fait sur le serveur de l'uni, jarrive a lancer des applications comme mozilla, et la fenetre est "redirigée" vers mon laptop (j'adore !)
Seulement voilà, ça marche pas quand je le fais depuis chez moi.
Code: |
alex@Gentoo_Server ~ $ firefox &
[1] 12057
alex@Gentoo_Server ~ $ xdpyinfo: unable to open display ":0.0".
No running windows found
(firefox-bin:12084): Gtk-WARNING **: cannot open display:
firefox-bin exited with non-zero status (1)
[1]+ Exit 1 firefox
|
J'ai regardé sur ce tuto , j'ai essayé de bidouiller le /etc/security/pam_env.conf mais rien n'y fait.
j'imagine que la manipulation a faire est uniquement sur le serveur, vu que ça marche si je fais un ssh sur l'uni.
j'ai regardé ce bug mais j'ai pas pigé grand chose, à part que ça a un rapport avec mon erreur ...
help !
thx. _________________ Macbook
Core2Duo @ 2.0GHz - 1Go RAM - HD 80Go - Intel GMA 945
Gentoo GNU/Linux
~amd64 - 2.6.24-gentoo-r2 - Fluxbox || (KDE && Compiz-Fusion)
Last edited by kaworu on Thu Mar 23, 2006 9:57 am; edited 1 time in total |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8717 Location: ~Brussels - Belgique
|
Posted: Thu Mar 23, 2006 7:55 am Post subject: |
|
|
c'est dans /etc/ssh
vérifie ssh_config et sshd_config : active "ForwardX11" et "X11Forwarding" ; puis redémarre sshd et ta session ssh _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
kaworu Guru
Joined: 07 Dec 2005 Posts: 450
|
Posted: Thu Mar 23, 2006 9:06 am Post subject: |
|
|
j'ai modifié , et ça n'a rien changé
/etc/ssh/ssh_config: |
# $OpenBSD: ssh_config,v 1.20 2005/01/28 09:45:53 dtucker Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
# Host *
ForwardAgent yes
ForwardX11 yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# EscapeChar ~
|
/etc/ssh/sshd_config: |
# $OpenBSD: sshd_config,v 1.72 2005/07/25 11:59:40 markus Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# 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
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
# 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 768
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
# 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 no
#PermitEmptyPasswords no
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# 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 mechanism.
# Depending on your PAM configuration, this may bypass the setting of
# PasswordAuthentication, PermitEmptyPasswords, and
# "PermitRootLogin without-password". If you just want the PAM account and
# session checks to run without PAM authentication, then enable this but set
# ChallengeResponseAuthentication=no
UsePAM yes
#AllowTcpForwarding yes
#GatewayPorts 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
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
# no default banner path
#Banner /some/path
# here is the new patched ldap related tokens
# entries in your LDAP must have posixAccount & ldapPublicKey objectclass
#UseLPK yes
#LpkLdapConf /etc/ldap.conf
#LpkServers ldap://127.0.0.4 ldap://127.0.0.3 ldap://127.0.0.1/
#LpkUserDN ou=users,dc=phear,dc=org
#LpkGroupDN ou=groups,dc=phear,dc=org
#LpkBindDN cn=Manager,dc=phear,dc=org
#LpkBindPw secret
#LpkServerGroup mail
#LpkForceTLS no
#LpkSearchTimelimit 3
#LpkBindTimelimit 3
# override default of no subsystems
Subsystem sftp /usr/lib/misc/sftp-server
|
_________________ Macbook
Core2Duo @ 2.0GHz - 1Go RAM - HD 80Go - Intel GMA 945
Gentoo GNU/Linux
~amd64 - 2.6.24-gentoo-r2 - Fluxbox || (KDE && Compiz-Fusion) |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8717 Location: ~Brussels - Belgique
|
Posted: Thu Mar 23, 2006 9:15 am Post subject: |
|
|
Quand tu es dans ta session SSH, que donne ? _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8717 Location: ~Brussels - Belgique
|
Posted: Thu Mar 23, 2006 9:17 am Post subject: |
|
|
Ha oui, autre chose : tu dois aussi autoriser les flux X : sous gnome : /etc/X11/gdm/(je ne sais plus par coeur) , tu dois activer TCP (mettre décommenter TCPDissallow et le mettre à "No") ; et bien sûr redémarrer xdm _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
kaworu Guru
Joined: 07 Dec 2005 Posts: 450
|
Posted: Thu Mar 23, 2006 9:32 am Post subject: |
|
|
Je ne trouve pas le fichier pour le TCPDisallow et je n'utilise pas gnome, donc y'a rien dans /etc/X11/gdm , je vois pas où chercher d'autres, car il n'y pas de directory /etc/X11/kdm ... _________________ Macbook
Core2Duo @ 2.0GHz - 1Go RAM - HD 80Go - Intel GMA 945
Gentoo GNU/Linux
~amd64 - 2.6.24-gentoo-r2 - Fluxbox || (KDE && Compiz-Fusion) |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8717 Location: ~Brussels - Belgique
|
Posted: Thu Mar 23, 2006 9:34 am Post subject: |
|
|
si le forward fonctionnait, tu aurais :10 à la place de :0 ...
chez moi, cette config suffit pour fonctionner, je n'ai pas d'autres idées _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
kaworu Guru
Joined: 07 Dec 2005 Posts: 450
|
Posted: Thu Mar 23, 2006 9:56 am Post subject: |
|
|
j'ai bidouiller les deux fichiers, et maintenant ça marche !
merci ^______^ _________________ Macbook
Core2Duo @ 2.0GHz - 1Go RAM - HD 80Go - Intel GMA 945
Gentoo GNU/Linux
~amd64 - 2.6.24-gentoo-r2 - Fluxbox || (KDE && Compiz-Fusion) |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8717 Location: ~Brussels - Belgique
|
Posted: Thu Mar 23, 2006 10:03 am Post subject: |
|
|
Service _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|