# 1 - गुम पैकेज?
आपको शायद वह पैकेज याद आ रहा है जिसमें शामिल है ssh-askpass। इसे स्थापित करने का प्रयास करें।
फेडोरा / CentOS / RHEL:
$ sudo yum install openssh-askpass
Debian / Ubuntu:
$ 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
Debian / Ubuntu:
$ 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 "एक टर्मिनल जुड़े नहीं है" और DISPLAY और SSH_ASKPASSस्थापित कर रहे हैं। यह देखना महत्वपूर्ण है। तो sshइसका उपयोग करने के लिए SSH_ASKPASSहमें sshएक टर्मिनल (उर्फ STDINऔर । STDOUT) संलग्न करने की आवश्यकता नहीं है।
कमांड का उपयोग करके ऐसा करने का एक तरीका setsid। बुरा मत मानना। मैंने इस उपकरण के बारे में कभी नहीं सुना। मैन पेज से:
setid - एक नए सत्र में एक कार्यक्रम चलाते हैं
इसलिए अगर हम 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
संदर्भ