[Mew-dist 13676] SSH login name, etc.
Tomoyuki Murakami
tomoyuki at example.com
2000年 7月 18日 (火) 21:06:00 JST
村上と申します
pop-authにpassが使えるようになったということで1.95b47にしてみました。
それと並行して、SSHを少し試してみたところ、sshコマンドの -l オプションに
て指定する、login nameが指定できないため、クライアントマシンのlogin
nameとPOP/SSHサーバのlogin nameが異なっている私の環境では不都合となりま
した。個人的に添付のような追加で凌いでおります。configのパラメータは(勝
手に)ssh-userとしています。
さて、このssh周りの個人的な修正とは関係無しに、私の以下のような環境で
sshコマンドに対してpassword(今のところpassphraseを使うようになっていな
い)が正しく渡っていないと思われる現象に遭遇し、頓座しております。
OS: FreeBSD 4.0R
emacs: XEmacs 21.1 (patch 8)
ssh:
SSH Version 1.2.27 [i386-unknown-freebsd4.0], protocol version 1.5.
Standard version. Does not use RSAREF.
ktraceで追いかけて見ると、
password文字列\r\n
がsshプロセスとの間のpipeに書き込まれているように見えるのですが、なぜか
Permission Denied.
が返ります。
Xemacsの外でssh -L ....をやる分には問題はなく、なぜかなーといったところ
です。同様の問題に遭われた方はいらっしゃいますでしょうか?
-------------- next part --------------
diff -r -u mew-1.95b47.orig/mew-config.el mew-1.95b47/mew-config.el
--- mew-1.95b47.orig/mew-config.el Thu Jul 13 22:05:58 2000
+++ mew-1.95b47/mew-config.el Sun Jul 16 00:26:01 2000
@@ -130,6 +130,9 @@
(defun mew-smtp-ssh-server (&optional case)
(mew-cfent-value case "smtp-ssh-server" mew-smtp-ssh-server))
+(defun mew-smtp-ssh-user (&optional case)
+ (mew-cfent-value case "smtp-ssh-user" mew-smtp-ssh-user))
+
(defun mew-smtp-helo-domain (&optional case)
(mew-cfent-value case "smtp-helo-domain" mew-smtp-helo-domain))
@@ -151,6 +154,9 @@
(defun mew-pop-ssh-server (&optional case)
(mew-cfent-value case "pop-ssh-server" mew-pop-ssh-server))
+
+(defun mew-pop-ssh-user (&optional case)
+ (mew-cfent-value case "pop-ssh-user" mew-pop-ssh-user))
(defun mew-pop-user (&optional case)
(mew-cfent-value case "pop-user" mew-pop-user))
diff -r -u mew-1.95b47.orig/mew-pop.el mew-1.95b47/mew-pop.el
--- mew-1.95b47.orig/mew-pop.el Thu Jul 13 22:05:58 2000
+++ mew-1.95b47/mew-pop.el Sun Jul 16 00:42:17 2000
@@ -152,6 +152,7 @@
(let* ((server (mew-pop-server case))
(port (mew-pop-port case))
(sshsrv (mew-pop-ssh-server case))
+ (sshusr (mew-pop-ssh-user case))
(pnm (mew-pop-server-to-pnm server sshsrv))
(process (get-process pnm))
(ret t)
@@ -161,7 +162,7 @@
(setq process (mew-pop-open pnm server port))
(if (not (string-match "^[0-9]+$" port))
(setq port "110")) ;; ssh rejects a symbol port name
- (setq sshpro (mew-open-ssh-stream server port sshsrv))
+ (setq sshpro (mew-open-ssh-stream server port sshsrv sshusr))
(mew-pop-set-ssh-process pnm sshpro)
(if (null sshpro)
(message "Can't connect to %s" sshsrv)
diff -r -u mew-1.95b47.orig/mew-smtp.el mew-1.95b47/mew-smtp.el
--- mew-1.95b47.orig/mew-smtp.el Thu Jul 6 14:13:52 2000
+++ mew-1.95b47/mew-smtp.el Sun Jul 16 00:43:29 2000
@@ -120,6 +120,7 @@
(let* ((server mew-draft-smtp-server)
(port mew-draft-smtp-port)
(sshsrv mew-draft-smtp-ssh-server)
+ (sshusr mew-smtp-ssh-user)
(pnm (mew-smtp-server-to-pnm server sshsrv))
(process (get-process pnm))
(ret t)
@@ -150,7 +151,7 @@
(setq process (mew-smtp-open pnm server port))
(if (not (string-match "^[0-9]+$" port))
(setq port "25")) ;; ssh rejects a symbol port name
- (setq sshpro (mew-open-ssh-stream server port sshsrv))
+ (setq sshpro (mew-open-ssh-stream server port sshsrv sshusr))
(mew-smtp-set-ssh-process pnm sshpro)
(if (null sshpro)
(setq errmsg (concat "Can't connect to " sshsrv))
diff -r -u mew-1.95b47.orig/mew-ssh.el mew-1.95b47/mew-ssh.el
--- mew-1.95b47.orig/mew-ssh.el Wed Jul 5 18:24:29 2000
+++ mew-1.95b47/mew-ssh.el Sun Jul 16 02:34:18 2000
@@ -25,7 +25,7 @@
;; xxx timer
-(defun mew-open-ssh-stream (server port sshserver)
+(defun mew-open-ssh-stream (server port sshserver sshuser)
"Open SSH stream for SERVER's PORT via SSHSHERVER.
This function returns a process when a SSH connection is created
successfully. A local port number can be obtained the process name
@@ -44,6 +44,7 @@
(setq pro (start-process
name nil
mew-prog-ssh "-x" "-v"
+ (format "-l %s" sshuser)
"-o" (concat
(if (= mew-ssh-ver 2)
"NumberOfPasswordPrompts " ;; OpenSSH style
diff -r -u mew-1.95b47.orig/mew-vars.el mew-1.95b47/mew-vars.el
--- mew-1.95b47.orig/mew-vars.el Thu Jul 13 22:05:58 2000
+++ mew-1.95b47/mew-vars.el Sun Jul 16 00:40:23 2000
@@ -298,6 +298,7 @@
(defvar mew-smtp-user (user-login-name))
(defvar mew-smtp-ssh-server nil)
+(defvar mew-smtp-ssh-user (user-login-name))
(defvar mew-smtp-keep-connection nil
"*If non-nil. SMTP connection is maintained for further SMTP
@@ -323,6 +324,7 @@
(defvar mew-pop-auth 'apop) ;; 'pass and 'apop
(defvar mew-pop-ssh-server nil)
+(defvar mew-pop-ssh-user (user-login-name))
(defvar mew-pop-delete t)
(defvar mew-pop-size (* 54 1024)) ;; 4K hdr + 50K bdy
Mew-dist メーリングリストの案内