* w32 ssh trouble @ 2003-05-15 1:55 Bruce Ingalls 2003-05-15 7:06 ` Jason Rumney 2003-05-15 8:40 ` Kai Großjohann 0 siblings, 2 replies; 12+ messages in thread From: Bruce Ingalls @ 2003-05-15 1:55 UTC (permalink / raw) I am trying to get TRAMP to work under w32. Note that Linux works fine for me. I tried executing M-x shell, then ssh. This fails, with the error Pseudo-terminal will not be allocated because stdin is not a terminal. Why am I getting this error, and what can I do about it? I also tried running ftp under the shell, but Emacs hangs, no error. I do not have these shell problems with w32 XEmacs. However, I have to figure out how the tramp syntax works. I am running the latest cygwin zsh as my default shell, latest tramp v2.0.33 and Emacs v21.3.1 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: w32 ssh trouble 2003-05-15 1:55 w32 ssh trouble Bruce Ingalls @ 2003-05-15 7:06 ` Jason Rumney 2003-05-15 14:52 ` Bruce Ingalls 2003-05-15 8:40 ` Kai Großjohann 1 sibling, 1 reply; 12+ messages in thread From: Jason Rumney @ 2003-05-15 7:06 UTC (permalink / raw) Bruce Ingalls <bingalls.NO_SPAM@fit-zones.com> writes: > I am trying to get TRAMP to work under w32. > Note that Linux works fine for me. > > I tried executing M-x shell, then ssh. > This fails, with the error > Pseudo-terminal will not be allocated because stdin is not a terminal. > > Why am I getting this error, and what can I do about it? You are getting the error because the version of ssh you are using expects a certain method of faking Unix pttys (I could take a wild guess here and say that you're using a Cygwin port of ssh). You could try using an alternative ssh client. plink (the putty command-line client) seems like it could work if you can get comint to recognize the passphrase prompt. > I also tried running ftp under the shell, but Emacs hangs, no error. Cygwin ftp? Same problem perhaps. > I do not have these shell problems with w32 XEmacs. Cygwin version? You would probably get the ptty emulation that Cygwin expects if you used the Cygwin port of Emacs as well. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: w32 ssh trouble 2003-05-15 7:06 ` Jason Rumney @ 2003-05-15 14:52 ` Bruce Ingalls 2003-05-15 20:07 ` Jason Rumney 2003-05-16 6:25 ` Kai Großjohann 0 siblings, 2 replies; 12+ messages in thread From: Bruce Ingalls @ 2003-05-15 14:52 UTC (permalink / raw) OK. Thanks to Kai's help on XEmacs notation, I can noew try with XEmacs, and discover that it works almost the same as Emacs (in this regard). I tried plink v0.53b (should be latest binary release), and I was able to get the prompt for the password, when I run it inside M-x shell. However, it does not recognize my password, even though I know that I am entering it correctly. I was able to get the following to work inside M-x shell. I don't think it matters, whether I use Cygwin or Cmd.exe for the child shell: plink -ssh -batch -pw mypassword user@domain.com This is less secure, as users can spy on `ps`, but that's not an issue on my single user machine. I'm not sure if this is a security problem on Windows in general, as I don't know of a way to look at command line args to running processes, even if I were to connect my machine in a public area, leave it logged in, and walk away, or allow Administrators to snoop (via e.g. RDP), for that matter. As far as Emacs versions: It looks that I was using native Emacs. This is the only binary widely distributed. I could not find a version of Emacs, which runs on the w32 desktop, yet supports Cygwin. I did discover that running the Cygwin Emacs package inside the Cygwin shell does work. There is still an annoying bug, where Cygwin Emacs does not recognize C-x C-c to quit Emacs, and I must use the F10/M-' menu. This is a bug in the port of Emacs to Cygwin. The version of XEmacs I work with, runs on the w32 desktop, but is compiled with Cygwin. Finally, I tried plink under both Cygwin & cmd shells, and it recognized my password the first time. Thus, M-x shell in Windows is making some kind of change to my password. Jason Rumney wrote: > Bruce Ingalls <bingalls.NO_SPAM@fit-zones.com> writes: > >>I am trying to get TRAMP to work under w32. >>Note that Linux works fine for me. >> >>I tried executing M-x shell, then ssh. >>This fails, with the error >>Pseudo-terminal will not be allocated because stdin is not a terminal. >> >>Why am I getting this error, and what can I do about it? > > You are getting the error because the version of ssh you are using > expects a certain method of faking Unix pttys (I could take a wild > guess here and say that you're using a Cygwin port of ssh). > > You could try using an alternative ssh client. plink (the putty > command-line client) seems like it could work if you can get comint > to recognize the passphrase prompt. > >>I do not have these shell problems with w32 XEmacs. > > Cygwin version? 1.3.22 - Everything is latest binary release ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: w32 ssh trouble 2003-05-15 14:52 ` Bruce Ingalls @ 2003-05-15 20:07 ` Jason Rumney 2003-05-16 6:25 ` Kai Großjohann 1 sibling, 0 replies; 12+ messages in thread From: Jason Rumney @ 2003-05-15 20:07 UTC (permalink / raw) Bruce Ingalls <bingalls.NO_SPAM@fit-zones.com> writes: > I tried plink v0.53b (should be latest binary release), and I was > able to get the prompt for the password, when I run it inside M-x shell. > However, it does not recognize my password, even though I know that I > am entering it correctly. Right. I got the same when I tried, that's why I mentioned making comint recognize that plink is prompting for a password/passphrase so it treats it differently. Perhaps that would not solve the problem though. Plink works for me with certificate authentication and pageant running (so it doesn't prompt for anything). > As far as Emacs versions: > It looks that I was using native Emacs. This is the only binary widely > distributed. I could not find a version of Emacs, which runs on the w32 > desktop, yet supports Cygwin. Right, the Cygwin version only supports tty and X. I know of no plans to make it support the native Windows GUI. > Finally, I tried plink under both Cygwin & cmd shells, and it > recognized my password the first time. Thus, M-x shell in Windows is > making some kind of change to my password. Maybe (line end characters perhaps). Or maybe the way that plink reads its password is not compatible with the indirection of running a shell within Emacs. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: w32 ssh trouble 2003-05-15 14:52 ` Bruce Ingalls 2003-05-15 20:07 ` Jason Rumney @ 2003-05-16 6:25 ` Kai Großjohann 2003-05-17 12:45 ` Bruce Ingalls 1 sibling, 1 reply; 12+ messages in thread From: Kai Großjohann @ 2003-05-16 6:25 UTC (permalink / raw) Bruce Ingalls <bingalls.NO_SPAM@fit-zones.com> writes: > I tried plink v0.53b (should be latest binary release), and I was > able to get the prompt for the password, when I run it inside M-x shell. > However, it does not recognize my password, even though I know that I > am entering it correctly. What happens when you use M-: (process-send-string nil "your-pw\n") RET to send the password? What happens when you use \r instead of \n? What happens when you use \r\n instead of \n? -- This line is not blank. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: w32 ssh trouble 2003-05-16 6:25 ` Kai Großjohann @ 2003-05-17 12:45 ` Bruce Ingalls 2003-05-17 19:46 ` Kai Großjohann 0 siblings, 1 reply; 12+ messages in thread From: Bruce Ingalls @ 2003-05-17 12:45 UTC (permalink / raw) Kai Großjohann wrote: > Bruce Ingalls <bingalls.NO_SPAM@fit-zones.com> writes: > > >>I tried plink v0.53b (should be latest binary release), and I was >>able to get the prompt for the password, when I run it inside M-x shell. >>However, it does not recognize my password, even though I know that I >>am entering it correctly. > > > What happens when you use M-: (process-send-string nil "your-pw\n") > RET to send the password? What happens when you use \r instead of > \n? What happens when you use \r\n instead of \n? Well, It's a bit hard to do this, in the middle of a password prompt. It tries to read in M-: (whatever control char that generates) as my password. I did try to do a C-g (a second time, after I got a "Non echoed text" prompt) and I noticed this phenomenon: The shell seems to chop off the last 2 characters of my input. Thus, "your-pw\r\n" would work best, as the \r and \n will get chopped out. In other words, this seems to work, but not for the reasons you expected. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: w32 ssh trouble 2003-05-17 12:45 ` Bruce Ingalls @ 2003-05-17 19:46 ` Kai Großjohann 2003-05-18 4:25 ` Bruce Ingalls 0 siblings, 1 reply; 12+ messages in thread From: Kai Großjohann @ 2003-05-17 19:46 UTC (permalink / raw) Bruce Ingalls <bingalls.NO_SPAM@fit-zones.com> writes: > Kai Großjohann wrote: >> Bruce Ingalls <bingalls.NO_SPAM@fit-zones.com> writes: >> >>>I tried plink v0.53b (should be latest binary release), and I was >>>able to get the prompt for the password, when I run it inside M-x shell. >>>However, it does not recognize my password, even though I know that I >>>am entering it correctly. >> What happens when you use M-: (process-send-string nil "your-pw\n") >> RET to send the password? What happens when you use \r instead of >> \n? What happens when you use \r\n instead of \n? > > Well, It's a bit hard to do this, in the middle of a password prompt. > It tries to read in M-: (whatever control char that generates) as my > password. Hm. Well, you can remove comint-watch-for-password-prompt from comint-output-filter-functions. That ought to remove the minibuffer prompt and thus you can do M-: normally. > I did try to do a C-g (a second time, after I got a "Non echoed text" > prompt) and I noticed this phenomenon: > The shell seems to chop off the last 2 characters of my input. Huh? That's weird. I could put stuff in Tramp that adds junk to passwords. (Are we talking about Tramp?) Surely I would do this if it makes users happy. But it makes me feel REALLY REALLY uneasy. *shudder* -- This line is not blank. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: w32 ssh trouble 2003-05-17 19:46 ` Kai Großjohann @ 2003-05-18 4:25 ` Bruce Ingalls 2003-05-18 8:35 ` Kai Großjohann 0 siblings, 1 reply; 12+ messages in thread From: Bruce Ingalls @ 2003-05-18 4:25 UTC (permalink / raw) Kai Großjohann wrote: > Bruce Ingalls <bingalls.NO_SPAM@fit-zones.com> writes: > >>>>I tried plink v0.53b (should be latest binary release), and I was >>>>able to get the prompt for the password, when I run it inside M-x shell. >>>>However, it does not recognize my password, even though I know that I >>>>am entering it correctly. >>> >>>What happens when you use M-: (process-send-string nil "your-pw\n") >>>RET to send the password? What happens when you use \r instead of >>>\n? What happens when you use \r\n instead of \n? >> >>Well, It's a bit hard to do this, in the middle of a password prompt. >>It tries to read in M-: (whatever control char that generates) as my >>password. > > Hm. Well, you can remove comint-watch-for-password-prompt from > comint-output-filter-functions. That ought to remove the minibuffer > prompt and thus you can do M-: normally. > >>I did try to do a C-g (a second time, after I got a "Non echoed text" >>prompt) and I noticed this phenomenon: >>The shell seems to chop off the last 2 characters of my input. > > Huh? That's weird. > > I could put stuff in Tramp that adds junk to passwords. (Are we > talking about Tramp?) Surely I would do this if it makes users > happy. But it makes me feel REALLY REALLY uneasy. *shudder* I tried the above, and yes, it works. I tried appending any 2 chars to the end, and this worked. We are not talking about Tramp, yet. I figure that I have to get plink (ssh) working in M-x shell, before we can talk about Tramp. Now that I can get plink working under M-x shell, I tried adding garbage to the end of my password in Tramp, but that did not work. Unfortunately, this is not a good indicator, as Plink only works for me via protocol 1, and I'll have to fool with Tramp settings for this. I understand your unease. The other solution is to pass in passwords, using Plink's -pw command line option. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: w32 ssh trouble 2003-05-18 4:25 ` Bruce Ingalls @ 2003-05-18 8:35 ` Kai Großjohann 2003-05-18 11:44 ` Bruce Ingalls 0 siblings, 1 reply; 12+ messages in thread From: Kai Großjohann @ 2003-05-18 8:35 UTC (permalink / raw) Bruce Ingalls <bingalls@SpAmBlOcK.fit-zones.com> writes: > I tried the above, and yes, it works. > I tried appending any 2 chars to the end, and this worked. Amazing. > We are not talking about Tramp, yet. I figure that I have to get plink > (ssh) working in M-x shell, before we can talk about Tramp. Good idea. > Now that I can get plink working under M-x shell, I tried adding > garbage to the end of my password in Tramp, but that did not work. > Unfortunately, this is not a good indicator, as Plink only works for > me via protocol 1, and I'll have to fool with Tramp settings for this. What's the command line you use to tell plink to use protocol 1? I'll add an entry plink1 to tramp-methods for you. > I understand your unease. The other solution is to pass in passwords, > using Plink's -pw command line option. Whee. That doesn't seem better. -- This line is not blank. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: w32 ssh trouble 2003-05-18 8:35 ` Kai Großjohann @ 2003-05-18 11:44 ` Bruce Ingalls 2003-05-18 15:02 ` Kai Großjohann 0 siblings, 1 reply; 12+ messages in thread From: Bruce Ingalls @ 2003-05-18 11:44 UTC (permalink / raw) Kai Großjohann wrote: > Bruce Ingalls <bingalls@SpAmBlOcK.fit-zones.com> writes: >>I tried appending any 2 chars to the end, and this worked. > > Amazing. > >>Now that I can get plink working under M-x shell, I tried adding >>garbage to the end of my password in Tramp, but that did not work. >>Unfortunately, this is not a good indicator, as Plink only works for >>me via protocol 1, and I'll have to fool with Tramp settings for this. > > What's the command line you use to tell plink to use protocol 1? > I'll add an entry plink1 to tramp-methods for you. -1 just like ssh. > >>I understand your unease. The other solution is to pass in passwords, >>using Plink's -pw command line option. > > Whee. That doesn't seem better. I forgot to mention, that you don't need to append garbage, when passing the password on the command line. BTW, I tested plink with both cygwin & the native cmd.exe shells, and they behave equally. I still must retest with XEmacs, but I don't expect different behavior. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: w32 ssh trouble 2003-05-18 11:44 ` Bruce Ingalls @ 2003-05-18 15:02 ` Kai Großjohann 0 siblings, 0 replies; 12+ messages in thread From: Kai Großjohann @ 2003-05-18 15:02 UTC (permalink / raw) Bruce Ingalls <bingalls@CUT-this-SPAM-BLOCK.fit-zones.com> writes: > Kai Großjohann wrote: >> Bruce Ingalls <bingalls@SpAmBlOcK.fit-zones.com> writes: > >>>I tried appending any 2 chars to the end, and this worked. >> Amazing. >> >>>Now that I can get plink working under M-x shell, I tried adding >>>garbage to the end of my password in Tramp, but that did not work. >>>Unfortunately, this is not a good indicator, as Plink only works for >>>me via protocol 1, and I'll have to fool with Tramp settings for this. >> What's the command line you use to tell plink to use protocol 1? >> I'll add an entry plink1 to tramp-methods for you. > > -1 just like ssh. Great. I've now added the entry. New version in CVS. So if I understand you correctly, you just have to append two random chars to your password, and then it will work, right? Whee. I wonder what's going to happen. It's really weird. >>>I understand your unease. The other solution is to pass in passwords, >>>using Plink's -pw command line option. >> Whee. That doesn't seem better. > > I forgot to mention, that you don't need to append garbage, when > passing the password on the command line. Understood. Hm. Does it work to set tramp-password-end-of-line to "xx\n"? It's a really really really dirty trick. But who knows... Alas, Tramp is not flexible enough to allow different values of tramp-password-end-of-line for different methods. -- This line is not blank. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: w32 ssh trouble 2003-05-15 1:55 w32 ssh trouble Bruce Ingalls 2003-05-15 7:06 ` Jason Rumney @ 2003-05-15 8:40 ` Kai Großjohann 1 sibling, 0 replies; 12+ messages in thread From: Kai Großjohann @ 2003-05-15 8:40 UTC (permalink / raw) Bruce Ingalls <bingalls.NO_SPAM@fit-zones.com> writes: > I do not have these shell problems with w32 XEmacs. > However, I have to figure out how the tramp syntax works. /[user@host]path/to/file /[method/user@host]path/to/file The square brackets are literally part of the filename syntax. I have preliminary changes for using the unified syntax under XEmacs, but I don't know how well or badly it works -- I don't normally use XEmacs, and it seems no XEmacs developer has tested it. -- This line is not blank. ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-05-18 15:02 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-05-15 1:55 w32 ssh trouble Bruce Ingalls 2003-05-15 7:06 ` Jason Rumney 2003-05-15 14:52 ` Bruce Ingalls 2003-05-15 20:07 ` Jason Rumney 2003-05-16 6:25 ` Kai Großjohann 2003-05-17 12:45 ` Bruce Ingalls 2003-05-17 19:46 ` Kai Großjohann 2003-05-18 4:25 ` Bruce Ingalls 2003-05-18 8:35 ` Kai Großjohann 2003-05-18 11:44 ` Bruce Ingalls 2003-05-18 15:02 ` Kai Großjohann 2003-05-15 8:40 ` Kai Großjohann
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.