X11 포워딩 문제 [7]

X11 포워딩 문제

2007-03-09 09:35 - 정종석

아래 문의한 것과 이어지는 문제입니다.

SHH를 서버에 설치하라고 하여 어찌어찌 설치는 한듯 합니다.

그런데 접속을 해보면

X11 포워딩을 활성화 하라는 메시지가 나오네요.

검색해보니 /etc/ssh/sshd_config 파일을 수정하라고 하는데..

/etc/ssh 폴더도 없거니와 sshd_config 파일을 찾을수가 없습니다.

ssh 설치가 제대로 안된건가요? ㅠ.ㅠ


solaris 8입니다.


Re: X11 포워딩 문제

2007-03-09 09:44 - 잘살아보세

유닉스에 처음부터 같이 나오는 프로그램의 설정들은 주로 /etc에 있지만요. 나중에 추가로 설치한 경우에는 파일들이 /usr/local/bin, /usr/local/sbin에 설치가 되고요. 설정 파일들도 /usr/local/etc에 주로 들어가요.
/usr/local/etc/ssh 이 디렉토리 찾아 보세요.

정 안되면 find 명령을 사용해 보세요.

find / -name sshd_config -print

이렇게요.
성공하시길 바래요.


Re: Re: X11 포워딩 문제

2007-03-09 16:16 - 정종석

감사합니다.

일단 sshd_config 파일을 /usr/local/etc 폴더에서 찾았습니다.

그래서 X11Forwarding을 yes로 수정했는데요.


/etc/init.d/sshd restart 라는 명령을 치면..

/etc/init.d/sshd: *// -e s/: 없음
usage: /etc/init.d/sshd {start|stop}

요런 메시지가 뜨네요..
이거 재 구동이 안되는거 아닌가요?

아무튼 reboot까지 했는데..

포워딩 활성화하라는 메시지는 여전히 뜹니다.




Re: Re: Re: X11 포워딩 문제

2007-03-09 17:09 - 넷사랑

안녕하십니까. 넷사랑컴퓨터 기술지원입니다.

말씀하신 상황을 보면 SSH 설정은 정상적으로 이루어졌습니다.
usage: /etc/init.d/sshd {start|stop} 라는 메시지가 나오는 것은 설치하신 SSH 버전이
restart 옵션을 지원하지 않기 때문입니다.


/etc/init.d/sshd stop
/etc/init.d/sshd start

위와 같이 명령을 두 번 내리시면 SSH 데몬이 재구동 됩니다.

X11 포워딩 서비스를 사용하기 위해서는 SSH에서 X11 포워딩을 활성화 시키는 것 뿐만 아니라
xauth라는 프로그램도 정상적으로 실행되어야 합니다. Solaris의 경우 일반적으로
/usr/openwin/bin 디렉토리에 xauth 파일이 있으므로 PATH 설정이나 xauth 파일 존재 유무 등을
살펴보시기 바랍니다.

문제가 계속해서 해결되지 않으면 sshd_config 파일의 내용을 보내주시면 문제 해결에
도움이 될 것 같습니다.

감사합니다.


Re: Re: Re: Re: X11 포워딩 문제

2007-03-09 18:39 - 정종석

총체적 난국이네요.
역시 아무것도 모르는 사람이 이런걸 시도하는게 아니었는데.. ㅠ.ㅠ


/etc/init.d/sshd stop
/etc/init.d/sshd start

이 두 명령 모두 아래와 같은 메시지가 뜹니다.

/etc/init.d/sshd: *// -e s/: 없음


요번엔 usage어쩌고 하는 메시지는 함께 안뜨네요.


그리고 찾아보니 /usr/openwin/bin 폴더에 xauth 파일은 있습니다.
그리고 PATH 설정은 어디서 어떻게 하는지 잘 모르겠네요.

너무 귀찮게 해드려 죄송합니다만 좀더 가르침을 주십시오.


아래는 sshd_config 내용입니다.
파일 다운 받아서 메모장에서 열어서 카피 했는데..
이렇게 해도 내용이 완벽히 카피 되는지 모르겠네요.




----




# $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker 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:/usr/local/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
#Protocol 2,1
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /usr/local/etc/ssh_host_key
# HostKeys for protocol version 2
#HostKey /usr/local/etc/ssh_host_rsa_key
#HostKey /usr/local/etc/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 /usr/local/etc/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

# 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 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

#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
#PermitTunnel no

# no default banner path
#Banner /some/path

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

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




Re: Re: Re: Re: Re: X11 포워딩 문제

2007-03-09 19:08 - 넷사랑

유닉스 뿐만 아니라 대부분의 OS의 환경설정 파일에서 '#'은 주석을 의미합니다. 주석은 설명을 위한 부분으로 #이 들어간 부분은 환경 설정에 영향을 끼치지 않습니다.

그러므로 sshd_config에서 다음 부분의 주석처리(#)를 해제하여 주셔야 합니다.

#X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes

이 부분을 이렇게 하십시오.

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

위와 같이 설정하신 sshd 데몬을 재구동하시면 문제가 해결될 것입니다. 데몬 재구동은 OS마다, 프로그램마다 동일하지 않습니다. 또한 유닉스에 대해 많이 알고 있지 않다고 하시니 서버 재구동을 권해드립니다.

감사합니다.


Re: Re: Re: Re: Re: Re: X11 포워딩 문제

2007-03-13 12:54 - 정종석

감사합니다.

주석처리 때문에 그랬던 거군요..

완전히 해결해서 잘 쓰고 있습니다. ^^


Re: Re: Re: Re: Re: Re: Re: X11 포워딩 문제

2007-03-13 17:21 - 넷사랑

문제가 해결되셨다니 다행입니다.

Xmanager에 관심을 가져주셔서 감사합니다.

항상 발전하는 넷사랑컴퓨터가 되겠습니다.


이전 조회수: 199