LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 12-12-2003, 07:48 PM   #1
guardian653
Member
 
Registered: Oct 2003
Distribution: Gentoo
Posts: 79

Rep: Reputation: 15
Problem with remote terminal (ssh and PuTTY)


First off, I like to say that this forum kicks ass, quick responses and the responses are always helpful; it's got me to run FreeBSD as my server

This isn't a hugh problem but its increasingly becoming annoying. I know on my old RedHat box when connecting through PuTTY I have full use of the keyboard.. All the letters, function keys, HOME & END, insert delete, num pad etc.... along with full colors (simple things like `ls`)

I got to FreeBSD and it stops.. somewhat

After looking on the internet I found out that the color problem might be caused by the terminal type I setup, so after looking for a while (hehe while) I found a suitable term type vt220-color (the linux type causes lines to be draw as letters like p and b) and it does welll...

My keyboard isn't so much in line; for example I can't use the Home key.. instead of going to the beginning of the line I get a "~" whenever I use the num pad in nano I always get a notice, "NumLock glitch detected. Keypad will malfuction..."

Any help will be GREATLY appericated!!!

Thanks
Dave
 
Old 12-12-2003, 10:34 PM   #2
taivu
LQ Newbie
 
Registered: Oct 2002
Location: Spain
Distribution: Ubuntu, Debian Sarge, FreeBSD
Posts: 19

Rep: Reputation: 0
I hate to post something I haven't tested myself, but trying this out won't break anything. The first part is what I have in my own .inputrc. The PuTTY part I found with Google and have no way of telling if it will work or not.

In .inputrc on the FreeBSD box add:
"\x7F": backward-delete-char
"\e[3~": delete-char
"\e[1~": beginning-of-line
"\e[4~": end-of-line

And in PuTTY's Configurations -> Terminal -> Keyboard set:
Backspace Key: Control-? (127)
Home and End keys: Standard
Function keys and keypad: Linux

Let us know if that worked.... or not.
 
Old 12-13-2003, 01:33 PM   #3
guardian653
Member
 
Registered: Oct 2003
Distribution: Gentoo
Posts: 79

Original Poster
Rep: Reputation: 15
Alas, it didn't I'm still getting that damned "~" character on my bash shell
I'll try looking up more info about this (at least I know were to start looking..)

Any more idea though?

Thanks
Dave
 
Old 12-14-2003, 09:42 AM   #4
taivu
LQ Newbie
 
Registered: Oct 2002
Location: Spain
Distribution: Ubuntu, Debian Sarge, FreeBSD
Posts: 19

Rep: Reputation: 0
Well, you got me curious so I went ahead and tested it as soon as I got access to a Windows machine. I hate to tell you this, but it worked just as it should when I ssh'd with PuTTY to my FreeBSD 4.9. Here are the settings (and a screenshot to show them):

Remote account on FreeBSD: settings already posted in the .inputrc

PuTTY: Backspace key to Control-? (127) and "Home and End keys" to Standard. No other changes (exept provinding host name and changing protocol to ssh).

After logging in home and end keys worked on the command line as they should, backspace deleted to the left and delete erased the character on top of it, just as these keys work in Windows (or Linux).

To test this further I created a brand new account, logged in with PuTTY (with the said settings) and experienced the "~" issue. Then I added the lines to .inputrc for that user and logged in again. Home, end, backspace and delete worked as expected.

I would appreciate if someone else would chime in since I really cannot figure out why it doesn't work for you.
 
Old 12-14-2003, 09:55 AM   #5
taivu
LQ Newbie
 
Registered: Oct 2002
Location: Spain
Distribution: Ubuntu, Debian Sarge, FreeBSD
Posts: 19

Rep: Reputation: 0
Re: Problem with remote terminal (ssh and PuTTY)

Quote:
Originally posted by guardian653
After looking on the internet I found out that the color problem might be caused by the terminal type I setup, so after looking for a while (hehe while) I found a suitable term type vt220-color (the linux type causes lines to be draw as letters like p and b) and it does welll...
Hey, where did you set the vt220-color? I'm not very familiar with PuTTY and I didn't see that in the options... What version of PuTTY are you running? (Mine is 0.53b which, I believe, is the latest).
 
Old 12-14-2003, 01:38 PM   #6
guardian653
Member
 
Registered: Oct 2003
Distribution: Gentoo
Posts: 79

Original Poster
Rep: Reputation: 15
To change your terminal type is done at the server side most of the time.

Add the following to your .bash_profile
TERM=vt220-color

or do it manually
export TERM=vt220-color

I'm using the same version if I remember right..

Any more clues?

Dave
 
Old 12-14-2003, 05:51 PM   #7
RJW
Member
 
Registered: Nov 2003
Posts: 146

Rep: Reputation: Disabled
I believe your issue isn't with PuTTY, but BASH. You may need to bind the keys in your `.profile' file.
 
Old 12-14-2003, 06:56 PM   #8
taivu
LQ Newbie
 
Registered: Oct 2002
Location: Spain
Distribution: Ubuntu, Debian Sarge, FreeBSD
Posts: 19

Rep: Reputation: 0
Quote:
Originally posted by guardian653
To change your terminal type is done at the server side most of the time.
DUH.. I know that... I thought you were talking about PuTTY's terminal emulations. No wonder I couldn't find vt220-color there

BTW, I just had an opportunity to access a fresh install of FreeBSD 4.9 with PuTTY and test the advice I gave in my first post. No other modifications done on the machine there, TERM was the default cons25 etc. I created the .inputrc and it gave me working backspace, delete, home and end - just as I expected.

Directory listing colors worked using ls -G.

I'm at loss here. If you have done a lot of testing trying to get the keys working, you may want to "go back your own trail" and see if the keys are being mapped in some other dotfile (or even the global ones in /etc).

I'm off to bed... hopefully someone comes along with a solution! Good night everyone!
 
Old 12-24-2003, 03:39 AM   #9
guardian653
Member
 
Registered: Oct 2003
Distribution: Gentoo
Posts: 79

Original Poster
Rep: Reputation: 15
Well, other than the belated response (long story involving slackware), I was able to get it respond correctly. It seems that my bash profile was screwing everything up, so I simply deleted it. Added my .inputrc to my home and everything work out fine

Thanks for putting me in the right direction taivu, RJW

Dave
 
Old 01-11-2005, 10:31 PM   #10
lichih
LQ Newbie
 
Registered: Jan 2005
Posts: 1

Rep: Reputation: 0
Have you tried these ?

bindkey "^[[1~" beginning-of-line
bindkey "^[[4~" end-of-line
 
Old 01-12-2005, 03:38 AM   #11
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
Read this
http://www.cyberciti.biz/nixcraft/vi...orized-ls.html and link to script!
Also read old post on same issue http://www.linuxquestions.org/questi...hreadid=257114

Last edited by nixcraft; 01-12-2005 at 03:45 AM.
 
Old 02-09-2005, 06:16 AM   #12
etherdeath
Member
 
Registered: Apr 2002
Location: New York City
Distribution: Debian
Posts: 30

Rep: Reputation: 15
I'm not sure if this will help you, but it worked for me :

In putty, under 'connection', set your terminal-type string to 'linux'.

I found this here :
http://lists.debian.org/debian-user/.../msg00853.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Terminal instead of PUTTY klmbrt Linux - Newbie 3 01-28-2005 01:33 PM
Putty / SSH Problem on Mandrake 10.0 jalperin Linux - Newbie 1 09-02-2004 12:25 PM
how to remote download file by putty SSH? treotan Linux - Newbie 5 08-02-2004 10:47 PM
Putty SSH remote desktop Solved learner_driver Linux - Networking 1 07-05-2004 03:02 PM
SSH Remote Terminal gauge73 Linux - General 2 01-29-2003 10:01 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 12:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration