# 1-패키지가 없습니까?
포함 된 패키지가 누락되었을 수 있습니다 ssh-askpass
. 설치해보십시오.
페도라 / CentOS / RHEL :
$ sudo yum install openssh-askpass
데비안 / 우분투 :
$ sudo apt-get install ssh-askpass-gnome ssh-askpass
누락 된 유틸리티 찾기
다음 명령을 사용하여 누락 된 도구를 검색 할 수 있습니다.
페도라 / CentOS / RHEL :
$ yum search ssh-askpass
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
======================================================= Matched: ssh-askpass =======================================================
x11-ssh-askpass.x86_64 : A passphrase dialog for X and not only for OpenSSH
ksshaskpass.x86_64 : A KDE version of ssh-askpass with KWallet support
connect-proxy.x86_64 : SSH Proxy command helper
openssh-askpass.x86_64 : A passphrase dialog for OpenSSH and X
데비안 / 우분투 :
$ apt-file -l search ssh-askpass
app-install-data
cruft
git-cola
luckybackup-data
pssh
sdm-terminal
seahorse
ssh-askpass
ssh-askpass-fullscreen
ssh-askpass-gnome
# 2-연결이 끊어진 터미널?
나는 이것을 처음 놓쳤지만 더 많은 것을 읽은 후에 환경 변수 에 ssh
관한 매뉴얼 페이지 에서이 의견을 발견했습니다 SSH_ASKPASS
.
발췌
SSH_ASKPASS If ssh needs a passphrase, it will read the passphrase from the
current terminal if it was run from a terminal. If ssh does not
have a terminal associated with it but DISPLAY and SSH_ASKPASS
are set, it will execute the program specified by SSH_ASKPASS
and open an X11 window to read the passphrase. This is particularly
useful when calling ssh from a .xsession or related script.
(Note that on some machines it may be necessary to redirect the
input from /dev/null to make this work.)
주석에서 알 수 있듯이, ssh에 "관련된 터미널이 없습니다" AND DISPLAY
& SSH_ASKPASS
가 설정되어 있습니다. 이것이 핵심입니다. 그래서 얻기 위해 ssh
사용하는 SSH_ASKPASS
우리가 얻을 필요 ssh
(일명. 터미널이하지 않는 STDIN
및 STDOUT
첨부 참조).
명령을 사용하여이를 수행하는 한 가지 방법 setsid
입니다. 기분 나빠하지 마십시오. 이 도구에 대해 들어 본 적이 없습니다. 매뉴얼 페이지에서 :
setsid-새 세션에서 프로그램을 실행
ssh
"프로그램"으로 실행하면 맨 페이지 에서 언급 한 기준에 맞는 터미널에서 setsid
분리 할 수 있습니다 . 다른 기준은 다음과 같이 설정됩니다.ssh
ssh
$ echo $DISPLAY; echo $SSH_ASKPASS
:0.0
/usr/libexec/openssh/ssh-askpass
우리가 이것을 모두 합치면 :
$ setsid ssh user@remotehost
예를 들면 다음과 같습니다.
$ setsid ssh user@skinner
해결책
를 setsid
"내장"으로 만들려면 다음과 같이 별칭을 만들 수 있습니다.
$ alias ssh="setsid ssh"
이제 ssh
비밀번호를 묻는 GUI 팝업이 나타납니다.
$ ssh user@skinner
참고 문헌