Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

putty ssh login and loosing intr keu (ctrl-C)

874 views
Skip to first unread message

donais

unread,
Feb 6, 2009, 8:21:37 PM2/6/09
to
I use Putty to access thru SSH an OSR 5.0.4 server to run Bbx
applications?

When loging with Putty to the server I can't have working ctrl-C
(escape key), ctrl-D (logout) and perhaps all other contol keys
entered
by keyboard.

I don't have this problem when I access the same server thru a
terminal
command line as: ssh 192.168.0.222 ... or if I use telnet login

Can somebody help me to find a solution?

---
Michel Donais

ThreeStar

unread,
Feb 6, 2009, 8:37:18 PM2/6/09
to

1. What is your TERM value (echo $TERM) when you log in via PuTTy?

2. What is your PuTTy Function keys setting (Terminal-->Keyboard)?

3. Since you're asking about function keys, what are they (type "stty
-a" after logging in via PuTTy)?

Ray Robert
*** Software

Bill Campbell

unread,
Feb 6, 2009, 8:44:16 PM2/6/09
to sco-...@celestial.com
On Fri, Feb 06, 2009, donais wrote:

>I use Putty to access thru SSH an OSR 5.0.4 server to run Bbx applications?

>When loging with Putty to the server I can't have working ctrl-C (escape
>key), ctrl-D (logout) and perhaps all other contol keys entered by
>keyboard.

Forwarning, I don't use Windows, but have configured putty a few times.

First off, OpenServer by default does not recognize ctrl-C as the
interrupt character, but expects a DEL (ctrl-?), which is not the
way most systems work. I put this in my .profile or /etc/profile

stty intr '^C' erase '^H' kill '^U'

Putty has some controls for things like the backspace key sending
either ctrl-H or the DECish ctrl-?

The ctrl-D for login may be blocked by your shell. Some nannyish
shells have something like IGNOREEOF to make you type ``exit''
and won't terminate the session on ctrl-D.

BTW: I also have this in my $HOME/XTerm file to force xterms to
the same mode as some Linux xterms get this wrong to my way of
thinking.

XTerm*ttyModes: intr ^C erase ^H kill ^U

Bill
--
INTERNET: bi...@celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
Voice: (206) 236-1676 Mercer Island, WA 98040-0820
Fax: (206) 232-9186

Do not meddle in the affairs of dragons,
for you are crunchy and taste good with ketchup.

donais

unread,
Feb 6, 2009, 10:48:28 PM2/6/09
to
> On Feb 6, 8:37 pm, ThreeStar <s...@3starsoftware.com> wrote:
> On Feb 6, 5:21 pm, donais <midon...@gmail.com> wrote:


Hi Ray,
thanks to help

>1. What is your TERM value (echo $TERM) when you log in via PuTTy?

ansi


>2. What is your PuTTy Function keys setting (Terminal-->Keyboard)?

backspace: control H
home/end key: standard
function and keypad: SCO
initial state cursor key: normal
initial state numeric keypad: normal

>3. Since you're asking about function keys, what are they (type "stty
>-a" after logging in via PuTTy)?

intr = ^C
quit = ^\
erase = ^H
kill = ^U


---
Michel Donais

donais

unread,
Feb 6, 2009, 11:07:46 PM2/6/09
to
> On Feb 6, 8:44 pm, Bill Campbell <b...@celestial.com> wrote:
> On Fri, Feb 06, 2009, donais wrote:

> Forwarning, I don't use Windows, but have configured putty a few times.

I use putty from a linux workstation or the server.


>
> First off, OpenServer by default does not recognize ctrl-C as the
> interrupt character, but expects a DEL (ctrl-?), which is not the
> way most systems work.  I put this in my .profile or /etc/profile
>
> stty intr '^C' erase '^H' kill '^U'

I have the preceding line in my .profile
login putty telnet or terminal command line, ^C ^H are working
login putty ssh intr ^C and backspace ^H are not working
login from SCO terminal both keys are working

if erase ^H is not set in my .profile
login putty telnet or terminal command line, ^C ^H are working
login putty ssh backspace is working but intr ^C is still not working
even I remove it from .profile
login from SCO terminal both keys are working

> Putty has some controls for things like the backspace key sending
> either ctrl-H or the DECish ctrl-?

It is why it's working when ^H is not set in .profile

> The ctrl-D for login may be blocked by your shell.  

Not necessarely by my shell but perhaps by my putty ssh setup or by
the setup in my SCO ssh_config.

I don't understand the following, because ^D ^U ^H are already set
in .profile and working for any access except putty SSH

> BTW:  I also have this in my $HOME/XTerm file to force xterms to
> the same mode as some Linux xterms get this wrong to my way of
> thinking.
> XTerm*ttyModes: intr ^C erase ^H kill ^U

---
Michel Donais

Brian K. White

unread,
Feb 7, 2009, 1:06:00 AM2/7/09
to

----- Original Message -----
From: "donais" <mido...@gmail.com>

> I have the preceding line in my .profile
> login putty telnet or terminal command line, ^C ^H are working
> login putty ssh intr ^C and backspace ^H are not working
> login from SCO terminal both keys are working

Try "stty sane" manually once.

You might be hitting a thing with older builds of ssh on sco.
I had this in a file ultimately loaded from /etc/profile on every sco box
for some years until at some point it was no longer necessary.
[ -n "$SSH_TTY" ] && stty sane
On current 5.0.7 boxes with the stock ssh it's definitely no longer
necessary.

Otherwise all I can suggest is to describe a known working config for me.
This is actually a 5.0.6 box with
"Secure Shell (ver 6.0.0Ga)" according to custom, which is really OpenSSH
4.2p1
Looks like I installed that after/over the stock one, from here.
ftp://ftp.sco.com/pub/openserver5/opensrc/openssh-4.2p1/openssh42p1_vol.tar

But I know it works fine on 5.0.7 with the stock ssh included too.
Definitely after any mp1-mp5.

On the sco box, I have /etc/ssh/sshd_config has everything commented out
except these:
UseLogin no
UsePrivilegeSeparation yes
Subsystem sftp /usr/lib/openssh/sftp-server

And I do NOT have any "stty sane" anywhere in /etc/profile or ~/.profile
In fact I have no stty adjustments at all since the goal is to get a
terminal
that mimicks the sco console as close as possible at first, and start from
there.
(If TERM is *ansi* during login. I do have case statements that make
adjustments if I'm logging in from linux or rxvt)

On your pc:
install the Amndale Mono font
http://prdownloads.sourceforge.net/corefonts/andale32.exe?download

Save the text below between the "---snip---" lines as a new text file named
sco_ssh.reg
and then double click it to import it.

Then in PuTTY load the new SCO_SSH entry, then manually enter an address and
hit open.

Everything works for me.
These settings happen to be geared towards legacy apps like bbx in fact,
with the cp437 character set & font and no scrollbar and fixed 80x25 window
size that zooms when maximized (or Alt-enter for really full screen) instead
of increasing the number of rows & columns. I use it under bbx and filepro
and new stuff like midnight commander.
two good acid tests also are backupedge and scoadmin. "custom" and a few
other places in scoadmin still causes putty to fail to display perfectly,
particularly when scrolling a list in a window. I can't make midnight
commander or filepro or bbx fail no matter what though so, users shouldn't
be in scoadmin anyways and neither should anyone except rarely.

As I mentioned this sets up putty to act as closely as possible to the sco
console or a good scoansi emulator.
Meaning Delete is break not ctrl-c , so now, starting from this established
working setup,
If I type "stty intr '^c'"
exactly as it looks, I didn't type ctrl-c I typed
single-forward-quote shift-6 c single-forward-quote
Now Delete doesn't work as break any more, but Ctrl-C does.

Backspace works fine and doesn't need any fixing.

Ctrl-D exits so that doesn't need any fixing either.

Several of these lines will wrap of course.
The easy rule is there is always one, and only one, "=" on each line.
Also every line begins with a quote.

Good luck.

--
Brian K. White br...@aljex.com http://profile.to/KEYofR
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!


---snip---
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\SSH_SCO]
"Present"=dword:00000001
"HostName"=""
"LogFileName"="putty.log"
"LogType"=dword:00000000
"LogFileClash"=dword:ffffffff
"LogFlush"=dword:00000001
"SSHLogOmitPasswords"=dword:00000001
"SSHLogOmitData"=dword:00000000
"Protocol"="ssh"
"PortNumber"=dword:00000016
"CloseOnExit"=dword:00000001
"WarnOnClose"=dword:00000001
"PingInterval"=dword:00000000
"PingIntervalSecs"=dword:00000014
"TCPNoDelay"=dword:00000001
"TCPKeepalives"=dword:00000001
"TerminalType"="ansi"
"TerminalSpeed"="38400,38400"
"TerminalModes"="INTR=A,QUIT=A,ERASE=A,KILL=A,EOF=A,EOL=A,EOL2=A,START=A,STOP=A,SUSP=A,DSUSP=A,REPRINT=A,WERASE=A,LNEXT=A,FLUSH=A,SWTCH=A,STATUS=A,DISCARD=A,IGNPAR=A,PARMRK=A,INPCK=A,ISTRIP=A,INLCR=A,IGNCR=A,ICRNL=A,IUCLC=A,IXON=A,IXANY=A,IXOFF=A,IMAXBEL=A,ISIG=A,ICANON=A,XCASE=A,ECHO=A,ECHOE=A,ECHOK=A,ECHONL=A,NOFLSH=A,TOSTOP=A,IEXTEN=A,ECHOCTL=A,ECHOKE=A,PENDIN=A,OPOST=A,OLCUC=A,ONLCR=A,OCRNL=A,ONOCR=A,ONLRET=A,CS7=A,CS8=A,PARENB=A,PARODD=A,"
"AddressFamily"=dword:00000001
"ProxyExcludeList"=""
"ProxyDNS"=dword:00000001
"ProxyLocalhost"=dword:00000000
"ProxyMethod"=dword:00000000
"ProxyHost"="proxy"
"ProxyPort"=dword:00000050
"ProxyUsername"=""
"ProxyPassword"=""
"ProxyTelnetCommand"="connect %host %port\\n"
"Environment"=""
"UserName"=""
"UserNameFromEnvironment"=dword:00000000
"LocalUserName"=""
"NoPTY"=dword:00000000
"Compression"=dword:00000000
"TryAgent"=dword:00000001
"AgentFwd"=dword:00000000
"GssapiFwd"=dword:00000000
"ChangeUsername"=dword:00000000
"Cipher"="blowfish,WARN,aes,3des,arcfour,des"
"KEX"="dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN"
"RekeyTime"=dword:0000003c
"RekeyBytes"="1G"
"SshNoAuth"=dword:00000000
"AuthTIS"=dword:00000000
"AuthKI"=dword:00000001
"AuthGSSAPI"=dword:00000001
"SshNoShell"=dword:00000000
"SshProt"=dword:00000003
"LogHost"=""
"SSH2DES"=dword:00000000
"PublicKeyFile"=""
"RemoteCommand"=""
"RFCEnviron"=dword:00000000
"PassiveTelnet"=dword:00000000
"BackspaceIsDelete"=dword:00000000
"RXVTHomeEnd"=dword:00000000
"LinuxFunctionKeys"=dword:00000005
"NoApplicationKeys"=dword:00000000
"NoApplicationCursors"=dword:00000000
"NoMouseReporting"=dword:00000000
"NoRemoteResize"=dword:00000000
"NoAltScreen"=dword:00000000
"NoRemoteWinTitle"=dword:00000000
"RemoteQTitleAction"=dword:00000001
"NoDBackspace"=dword:00000000
"NoRemoteCharset"=dword:00000000
"ApplicationCursorKeys"=dword:00000000
"ApplicationKeypad"=dword:00000000
"NetHackKeypad"=dword:00000000
"AltF4"=dword:00000000
"AltSpace"=dword:00000000
"AltOnly"=dword:00000000
"ComposeKey"=dword:00000000
"CtrlAltKeys"=dword:00000001
"TelnetKey"=dword:00000000
"TelnetRet"=dword:00000001
"LocalEcho"=dword:00000001
"LocalEdit"=dword:00000001
"Answerback"="PuTTY^M"
"AlwaysOnTop"=dword:00000000
"FullScreenOnAltEnter"=dword:00000001
"HideMousePtr"=dword:00000000
"SunkenEdge"=dword:00000000
"WindowBorder"=dword:00000001
"CurType"=dword:00000000
"BlinkCur"=dword:00000000
"Beep"=dword:00000001
"BeepInd"=dword:00000000
"BellWaveFile"=""
"BellOverload"=dword:00000001
"BellOverloadN"=dword:00000005
"BellOverloadT"=dword:000007d0
"BellOverloadS"=dword:00001388
"ScrollbackLines"=dword:00000000
"DECOriginMode"=dword:00000000
"AutoWrapMode"=dword:00000001
"LFImpliesCR"=dword:00000000
"CRImpliesLF"=dword:00000000
"DisableArabicShaping"=dword:00000000
"DisableBidi"=dword:00000000
"WinNameAlways"=dword:00000001
"WinTitle"=""
"TermWidth"=dword:00000050
"TermHeight"=dword:00000019
"Font"="Andale Mono"
"FontIsBold"=dword:00000000
"FontCharSet"=dword:00000000
"FontHeight"=dword:0000000e
"FontQuality"=dword:00000000
"FontVTMode"=dword:00000001
"UseSystemColours"=dword:00000000
"TryPalette"=dword:00000000
"ANSIColour"=dword:00000001
"Xterm256Colour"=dword:00000001
"BoldAsColour"=dword:00000001
"Colour0"="187,187,187"
"Colour1"="255,255,255"
"Colour2"="0,0,0"
"Colour3"="85,85,85"
"Colour4"="0,0,0"
"Colour5"="0,255,0"
"Colour6"="0,0,0"
"Colour7"="85,85,85"
"Colour8"="187,0,0"
"Colour9"="255,85,85"
"Colour10"="0,187,0"
"Colour11"="85,255,85"
"Colour12"="187,187,0"
"Colour13"="255,255,85"
"Colour14"="0,0,187"
"Colour15"="85,85,255"
"Colour16"="187,0,187"
"Colour17"="255,85,255"
"Colour18"="0,187,187"
"Colour19"="85,255,255"
"Colour20"="187,187,187"
"Colour21"="255,255,255"
"RawCNP"=dword:00000000
"PasteRTF"=dword:00000000
"MouseIsXterm"=dword:00000000
"RectSelect"=dword:00000000
"MouseOverride"=dword:00000001
"Wordness0"="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
"Wordness32"="0,1,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1"
"Wordness64"="1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,2"
"Wordness96"="1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1"
"Wordness128"="1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"
"Wordness160"="1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"
"Wordness192"="2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2"
"Wordness224"="2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2"
"LineCodePage"="CP437"
"CJKAmbigWide"=dword:00000000
"UTF8Override"=dword:00000001
"Printer"=""
"CapsLockCyr"=dword:00000000
"ScrollBar"=dword:00000000
"ScrollBarFullScreen"=dword:00000000
"ScrollOnKey"=dword:00000000
"ScrollOnDisp"=dword:00000001
"EraseToScrollback"=dword:00000001
"LockSize"=dword:00000002
"BCE"=dword:00000001
"BlinkText"=dword:00000000
"X11Forward"=dword:00000000
"X11Display"=""
"X11AuthType"=dword:00000001
"X11AuthFile"=""
"LocalPortAcceptAll"=dword:00000000
"RemotePortAcceptAll"=dword:00000000
"PortForwardings"=""
"BugIgnore1"=dword:00000000
"BugPlainPW1"=dword:00000000
"BugRSA1"=dword:00000000
"BugHMAC2"=dword:00000000
"BugDeriveKey2"=dword:00000000
"BugRSAPad2"=dword:00000000
"BugPKSessID2"=dword:00000000
"BugRekey2"=dword:00000000
"BugMaxPkt2"=dword:00000000
"StampUtmp"=dword:00000001
"LoginShell"=dword:00000001
"ScrollbarOnLeft"=dword:00000000
"BoldFont"=""
"BoldFontIsBold"=dword:00330031
"BoldFontCharSet"=dword:003b0758
"BoldFontHeight"=dword:0012fb14
"WideFont"=""
"WideFontIsBold"=dword:00370031
"WideFontCharSet"=dword:00330031
"WideFontHeight"=dword:00300030
"WideBoldFont"=""
"WideBoldFontIsBold"=dword:003b0178
"WideBoldFontCharSet"=dword:00370031
"WideBoldFontHeight"=dword:00340031
"ShadowBold"=dword:00000000
"ShadowBoldOffset"=dword:00000001
"SerialLine"="COM1"
"SerialSpeed"=dword:00002580
"SerialDataBits"=dword:00000008
"SerialStopHalfbits"=dword:00000002
"SerialParity"=dword:00000000
"SerialFlowControl"=dword:00000001

---snip---


donais

unread,
Feb 8, 2009, 1:06:52 AM2/8/09
to
On Feb 7, 1:06 am, "Brian K. White" <br...@aljex.com> wrote:
> ----- Original Message -----

Hi Brian,

> Try "stty sane" manually once.

I tried and have no result.

> You might be hitting a thing with older builds of ssh on sco.
> I had this in a file ultimately loaded from /etc/profile on every sco box
> for some years until at some point it was no longer necessary.

I just put this line in my .profile and it done the job.


> [ -n "$SSH_TTY" ] && stty sane

> On the sco box, I have /etc/ssh/sshd_config has everything commented out

On the SCO, the actual verion is OpenSsh_3.1p1; I didn't have to
uncomment
any line. The .profile modification was enough.

I will do later a test drive with version 4.2p1 and the rest of your
explanations.

Thank's a lot for your help and the time you took to write a clear
solution

---
Michel Donais

Nico Kadel-Garcia

unread,
Feb 8, 2009, 11:41:19 PM2/8/09
to

Oh, goodness, that is way out of date.

Is there some reason you are still on 5.04? Can you update to 5.0.7,
at least, which gets you a whole stack of better organized open source
tools in a nice SCO published package for SSH and a much better
integrated GNU toolchain in the 'gnutools' package? Continuing to
spend time on such an out of date version of an out of date release is
just encouraging more pain for you going forward.

donais

unread,
Feb 9, 2009, 12:43:19 AM2/9/09
to
> Oh, goodness, that is way out of date.
> Is there some reason you are still on 5.04?

We are with SCO from 3.2.4.2. only for our BBx accounting software.
We evolve with SCO till 5.0.4 only to accomodate BBx upgrades.

For that time our in house accounting software is text only. We pushed
the devolpement of this software to the maximum of it's capacity
upgrading hardware only.

By the years we faced the necessity to gives graphics workstations,
internet coimmunications, mailing, office software, etc...,

We looked at Windows with all it's bugs and hability to be constently
hacked and infected, SCO we operate was deceiving in part for it's
lack
of facility to integrate opensource software and the cost of these two
O/S.

We conclude that Red Hat Linux was not a so bad choice and we decided
to evolve in that direction.

Actually, the server is under Centos, work station operates as
Diskless Workstations
with a software named Linux Terminal Server Project. wich is light and
efficient.
Our recent quest for SSh was only to permit Linux users to login the
SCO in closed
circuit without entering user name and password.

For good consideration SCO from the begining is a very stable and
efficient system;
we keep it for that reason and we don't need more.

Sincerely,

Michel Donais

Nico Kadel-Garcia

unread,
Feb 9, 2009, 7:38:28 AM2/9/09
to

That seems reasonable, and explains why you are using 5.0.x. But the
time you are spending trying to integrate and cooperate with more
recent versions of open source tools, such as OpenSSH, is very
expensive. I recently spent a year helping a company migrate from SCO
OpenServer 5.0.6 to RHEL 5, and I found myself wishing repeatedly that
we'd had funding and buy-in to upgrade those servers, or their VMware
hosted virtual replacement systems for fallback access to old software
and data, to OpenServer 5.0.7 to save me a lot of support work.

In fact, where are you? I'm on a short term contract right now and may
be able to offer some help in your migration efforts.

donais

unread,
Feb 9, 2009, 11:11:35 PM2/9/09
to
> That seems reasonable, and explains why you are using 5.0.x. But the
> time you are spending trying to integrate and cooperate with more
> recent versions of open source tools, such as OpenSSH, is very
> expensive. I recently spent a year helping a company migrate from SCO
> OpenServer 5.0.6 to RHEL 5, and I found myself wishing repeatedly that
> we'd had funding and buy-in to upgrade those servers, or their VMware
> hosted virtual replacement systems for fallback access to old software
> and data, to OpenServer 5.0.7 to save me a lot of support work.
>
> In fact, where are you? I'm on a short term contract right now and may
> be able to offer some help in your migration efforts.- Hide quoted text -
>

There is not not much time spending because I always try to stay with
applications software versions that were coming with 5.0.4. and I do
not
try to re-invent the wheel.

Where I loose time is to find the right application that will fill our
needs
and do the job the way I want it done.

In the recent SSH case, I looked at telnet, rlogin and ssh; because I
was
in a closed circuit lan and wished a direct connection for the
workstations
without interaction of login and password. SSH permits this way of
login
and it was easy to use. The bug went when I discovered that ctl keys
were not working. Thats not in the manual and I didn't found on the
web
the solution. So I went to this list hoping that a knowledgable person
had
suffer this situation and be able to give me his solution.

I'm grateful to a lot of good guys in this list and the Business Bsic
list who
for the last 20 years always answered my request and help me to
solved
situations where the manual is less valuable than the experience.

> In fact, where are you? I'm on a short term contract right now and may

> be able to offer some help in your migration efforts.- Hide quoted text -
>
I'm located near Montreal in Canada. For the migration, we are at the
final stage to test for bugs and if everyting stays the way it is now,
it
will be in operation in about a month.

---
Michel Donais

Nico Kadel-Garcia

unread,
Feb 9, 2009, 11:59:03 PM2/9/09
to
On 9 Feb, 23:11, donais <midon...@gmail.com> wrote:

> > In fact, where are you? I'm on a short term contract right now and may
> > be able to offer some help in your migration efforts.- Hide quoted text -
>
> I'm located near Montreal in Canada. For the migration, we are at the
> final stage to test for bugs and if everyting stays the way it is now,
> it
> will be in operation in about a month.

Cool! I'm in Boston, so you're out of reach, even if you needed some
help.

If you can, *do* take disk images of your systems before you shut them
down, in order to be able to virtualize them if you have to a year or
so from now.

0 new messages