[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rlogin getting confused by ssh-askpass
From: |
Miles Bader |
Subject: |
Re: rlogin getting confused by ssh-askpass |
Date: |
Tue, 29 Jun 2004 17:36:35 -0000 |
I must admit I was a bit confused by your message (:-) so I'm not sure
my answer is relevant, but I think general to make ssh work well for a
real login session you should (1) force emacs rlogin to use a PTY (with
the `rlogin-process-connection-type' variable, and (2) force ssh to use
one too (with the `-t' option).
I use the following little function in my .emacs:
(defun ssh (host &optional buffer-name)
(interactive (list
(read-from-minibuffer "SSH host: " nil nil nil 'ssh-history)
current-prefix-arg))
(unless buffer-name
(setq buffer-name (concat "*ssh-" host "*")))
(let ((rlogin-program "ssh")
(rlogin-process-connection-type t)
(init (not (comint-check-proc buffer-name))))
(rlogin (concat "-t " host " bash -i") buffer-name)
;; The following uses tramp to make emacs file-name completion in
;; the the remote shell buffer be correct -- but it's very slow
;; to start up, so it's disabled here:
;;(when init
;; (cd (concat "/" (user-login-name) "@" host ":")))
))
Note the comment at the end about tramp and the working directory.
I also usually have handy little helper functions for each host I use,
e.g., for fencepost.gnu.org, I have:
(defun fp () (interactive) (ssh "fp.gnu.org" "fp"))
So typing `M-x fp RET' gets me to the fencepost session...
-Miles
--
`Life is a boundless sea of bitterness'