all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* rlogin getting confused by ssh-askpass
@ 2004-06-10 22:41 Leandro Guimaraens Faria Corsetti Dutra
  2004-06-11  0:07 ` Miles Bader
  0 siblings, 1 reply; 4+ messages in thread
From: Leandro Guimaraens Faria Corsetti Dutra @ 2004-06-10 22:41 UTC (permalink / raw)


	I have to access my home machine from work, and thought,
Great! one more task for the mighty GNU Emacs.  I actually have done
this before, but I guess it was with plain rlogin, because slogin is
getting seriously confused.

	I type wonderful M-x rlogin, then at the prompt answer
<host> -l <user>.  Emacs opens the familiar *rlogin-<user>@<system>*
buffer, but with the disappointing content of 'Pseudo-terminal will
not be allocated because stdin is not a terminal.'.  Then it takes a
while, and fires a Gnome window asking me for my password.  I provide
it, and nothing happens.  Never ever.

	So I did that again having replaced ssh-askpass-gnome with its
Gtk+ and X11 variants, and got same results.  So great, it looks like
the rlogin package is confused.  Tried after removing all of them, and
restarting Emacs so it wouldn't perhaps think there was still
something there, and got now the befuddling buffer contents:

Pseudo-terminal will not be allocated because stdin is not a terminal.
ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
Permission denied, please try again.
ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
Received disconnect from 201.6.145.152: 2: Too many authentication failures for leandro

Process *rlogin-leandro@dutras.dyndns.org.* exited abnormally with code 255


	So what should I do, despair and open Gnome Terminal?  I even
tried looking at rlogin.el, but my ignorance got the better of me...

	Shouldn't it just ask me for my password in the minibuffer?

	Thanks in advance!


-- 
Leandro Guimarães Faria Corsetti Dutra           +55 (11) 5685 2219
Av Sgto Geraldo Santana, 1100 6/71        leandro@dutra.fastmail.fm
04.674-000  São Paulo, SP                                    BRASIL
http://br.geocities.com./lgcdutra/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rlogin getting confused by ssh-askpass
  2004-06-10 22:41 rlogin getting confused by ssh-askpass Leandro Guimaraens Faria Corsetti Dutra
@ 2004-06-11  0:07 ` Miles Bader
  2004-06-11  0:29   ` Miles Bader
  2004-06-11  1:29   ` Leandro Guimaraens Faria Corsetti Dutra
  0 siblings, 2 replies; 4+ messages in thread
From: Miles Bader @ 2004-06-11  0:07 UTC (permalink / raw)


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'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rlogin getting confused by ssh-askpass
  2004-06-11  0:07 ` Miles Bader
@ 2004-06-11  0:29   ` Miles Bader
  2004-06-11  1:29   ` Leandro Guimaraens Faria Corsetti Dutra
  1 sibling, 0 replies; 4+ messages in thread
From: Miles Bader @ 2004-06-11  0:29 UTC (permalink / raw)


Oh, BTW, another detail about my `ssh' function -- note that it
explicitly runs "bash -i" -- this is to force bash to run as an
`interactive shell', which doesn't seem to happen by default with ssh.

It would be nice to have some way to just let the user's default login
shell run appropriately, but I could never figure it out (ssh's default
behavior is generally pretty annoying for interactive session,
actually).

-Miles
-- 
We are all lying in the gutter, but some of us are looking at the stars.
-Oscar Wilde

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rlogin getting confused by ssh-askpass
  2004-06-11  0:07 ` Miles Bader
  2004-06-11  0:29   ` Miles Bader
@ 2004-06-11  1:29   ` Leandro Guimaraens Faria Corsetti Dutra
  1 sibling, 0 replies; 4+ messages in thread
From: Leandro Guimaraens Faria Corsetti Dutra @ 2004-06-11  1:29 UTC (permalink / raw)


Em Fri, 11 Jun 2004 09:07:01 +0900, Miles Bader escreveu:

> 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

	That was it!

	OTOH, it sure would have been nice to get GNU Emacs to talk to
ssh-askpass-gnome.

	Thanks a lot!


-- 
Leandro Guimarães Faria Corsetti Dutra           +55 (11) 5685 2219
Av Sgto Geraldo Santana, 1100 6/71        leandro@dutra.fastmail.fm
04.674-000  São Paulo, SP                                    BRASIL
http://br.geocities.com./lgcdutra/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-06-11  1:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-10 22:41 rlogin getting confused by ssh-askpass Leandro Guimaraens Faria Corsetti Dutra
2004-06-11  0:07 ` Miles Bader
2004-06-11  0:29   ` Miles Bader
2004-06-11  1:29   ` Leandro Guimaraens Faria Corsetti Dutra

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.