* Key mappings in ssh
@ 2002-05-20 9:41 rudy
2002-05-20 10:22 ` David T-G
0 siblings, 1 reply; 6+ messages in thread
From: rudy @ 2002-05-20 9:41 UTC (permalink / raw)
To: cygwin
I have a problem using sshd on cygwin: the backspace key does not work as
expected, for example in vi (inserts ^? ) and cat. To get it working I
have to press Ctrl+H. Bash prompt behaves properly (therefore I assume
that readline interprets the keycode better). Also, local bash prompt (not
using sshd, just starting ...\bin\bash.exe works ok (even with
.bash_profile setting TERM to linux)
Environment:
- latest (updated) complete cygwin version installation,
- ssh client Putty (also ShellGuard -- former TelNeat),
- TERM=linux (for shellguard) or xterm (for Putty)
There are some ways to get it working properly:
- using putty, I can configure backspace to send Ctrl+H
- if I open ShellGuard to a linux machine (where BackSpace works ok) then
ssh to cygwin machine, it works again.
I am not very sure, but I *think* this occured recently, after (for
example) updating cygwin's openssh, terminfo etc to latest versions.
I tried playing with bs option in shellguard's termcap.ini but no success.
Ideas?
Thanks in advance,
rudy
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Key mappings in ssh
2002-05-20 9:41 Key mappings in ssh rudy
@ 2002-05-20 10:22 ` David T-G
2002-05-20 10:35 ` Thanks (Re: Key mappings in ssh) & OE allergic to PGP? Max Bowsher
0 siblings, 1 reply; 6+ messages in thread
From: David T-G @ 2002-05-20 10:22 UTC (permalink / raw)
To: CygWin Users' List
[-- Attachment #1: Type: text/plain, Size: 1713 bytes --]
Rudy --
...and then rudy@viper.iasi.rdsnet.ro said...
%
% I have a problem using sshd on cygwin: the backspace key does not work as
% expected, for example in vi (inserts ^? ) and cat. To get it working I
Is this ssh-ing out of your cygwin box or into it?
In either case, the problem is a tty configuration mismatch between where
you are (ssh nnnnn) and where you're going (running the shell).
Use
stty -a
to see how your current settings are (look particularly for "erase") and
then
stty erase NN
to set it as you wish (say ^ and ? or perhaps ^ and h).
If you always send delete, then you can just put
stty erase ^?
into your .profile (or .bash_profile or .bashrc or whatever it is if
you're coming back into your cygwin box; I haven't figured it out under
cygwin yet) and that will force the matter.
Another thing that folks sometimes do is whip up a simple script actually
named ctrl-h or ctrl-questionmark and put the relevant stty commands
in there; when you hit the backspace key at the prompt, you'll either
properly try to back up and do nothing or spit out a wonky character,
which the shell will interpret when you hit return and away you go :-)
I don't recommend it (these things should really be negotiated better,
and your term settings should be transparent) but it's a useful kludge.
...
% Ideas?
HTH & HAND
%
%
% Thanks in advance,
% rudy
:-D
--
David T-G * It's easier to fight for one's principles
(play) davidtg@justpickone.org * than to live up to them. -- fortune cookie
(work) davidtgwork@justpickone.org
http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Thanks (Re: Key mappings in ssh) & OE allergic to PGP?
2002-05-20 10:22 ` David T-G
@ 2002-05-20 10:35 ` Max Bowsher
2002-05-20 10:38 ` David T-G
0 siblings, 1 reply; 6+ messages in thread
From: Max Bowsher @ 2002-05-20 10:35 UTC (permalink / raw)
To: David T-G, CygWin Users' List
Many thanks, David, for that stty hint - that solves a problem I have lived with
for quite a while - I haven't found any good introductions to the finer points
of terminals on the web.
Secondly, I'm beginninge to suspect that Outlook Express is allergic to PGP
signed mail. (It displays a blank mail, with the body in a .txt attachment and
the PGP sig in a .dat attachment.) I know that the obvious answer is to get a
better mail client, but does anyone have any workarounds in the mean time?
Max.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Thanks (Re: Key mappings in ssh) & OE allergic to PGP?
2002-05-20 10:35 ` Thanks (Re: Key mappings in ssh) & OE allergic to PGP? Max Bowsher
@ 2002-05-20 10:38 ` David T-G
0 siblings, 0 replies; 6+ messages in thread
From: David T-G @ 2002-05-20 10:38 UTC (permalink / raw)
To: CygWin Users' List; +Cc: Max Bowsher
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Max --
...and then Max Bowsher said...
%
% Many thanks, David, for that stty hint - that solves a problem I have lived with
Happy to help!
% for quite a while - I haven't found any good introductions to the finer points
% of terminals on the web.
*grin*
%
% Secondly, I'm beginninge to suspect that Outlook Express is allergic to PGP
% signed mail. (It displays a blank mail, with the body in a .txt attachment and
<dryly>amongst other things</dryly>
% the PGP sig in a .dat attachment.) I know that the obvious answer is to get a
% better mail client, but does anyone have any workarounds in the mean time?
If you ask *really* nicely I can fold and mutilate my mail enough to
work for you, like I have this one, but you have, indeed, correctly hit
upon the obvious answer. To keep this on topic, I suggest mutt under
cygwin :-)
%
% Max.
HTH & HAND
:-D
- --
David T-G * It's easier to fight for one's principles
(play) davidtg@justpickone.org * than to live up to them. -- fortune cookie
(work) davidtgwork@justpickone.org
http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE86SRBGb7uCXufRwARAofKAKC/LQXGiP1JvnSdxrJ7gbBHxBVtjACgi+1S
bvq3ux9RNriIcdyqU1Ekgjw=
=q9i9
-----END PGP SIGNATURE-----
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Key mappings in ssh
2002-05-20 12:03 Key mappings in ssh rudy
@ 2002-05-20 15:49 ` Tony Arnold
0 siblings, 0 replies; 6+ messages in thread
From: Tony Arnold @ 2002-05-20 15:49 UTC (permalink / raw)
To: cygwin
Rudy,
> Thanks for the tip with stty. It worked ok. Now I'm facing
> the following
> problem:
> -I need to have stty erase ^? while connecting with ssh to
> cygwin -and on the other hand I need stty erase ^H in bash prompts
I think bash should work with erase set to either ^? Or ^H. Try it!
Regards,
Tony.
--
Tony Arnold, Deputy to the Head of COS Division, Manchester Computing,
University of Manchester, Oxford Road, Manchester M13 9PL.
T: +44 (0)161 275 6093, F: +44 (0)870 136 1004, M: +44 (0)773 330 0039
E-mail: tony.arnold@man.ac.uk, Home: http://www.man.ac.uk/Tony.Arnold
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Key mappings in ssh
@ 2002-05-20 12:03 rudy
2002-05-20 15:49 ` Tony Arnold
0 siblings, 1 reply; 6+ messages in thread
From: rudy @ 2002-05-20 12:03 UTC (permalink / raw)
To: cygwin
> Is this ssh-ing out of your cygwin box or into it?
I am using a third party client to connect to sshd on cygwin.
Thanks for the tip with stty. It worked ok. Now I'm facing the following
problem:
-I need to have stty erase ^? while connecting with ssh to cygwin
-and on the other hand I need stty erase ^H in bash prompts
So I try writing a script (which can't rely on /var/run/utmp, as cygwin
doesn't seem to maintain it) to tell which stty param to run...
ps reports processes using either con either 0 1 2 ... tty's, so I should
be able to detect this. I still don't know how but... :-)
Another question: linux man page for termcap tells that kb is a string
parameter. Indeed, on linux systems (and not only) in /etc/termcap we can
find, for example ...:kb=\177:... Why does the cygwin termcap only
specifies ...:kb:... ?
Thanks again,
rudy
PS btw: I ran stty -a both on bash prompt and ssh prompt. Why do they
report differently? Does the ssh protocol negociates this kind of settings
on startup?
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-05-20 17:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-20 9:41 Key mappings in ssh rudy
2002-05-20 10:22 ` David T-G
2002-05-20 10:35 ` Thanks (Re: Key mappings in ssh) & OE allergic to PGP? Max Bowsher
2002-05-20 10:38 ` David T-G
2002-05-20 12:03 Key mappings in ssh rudy
2002-05-20 15:49 ` Tony Arnold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).