Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

PuTTY closes before connection established.

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Spartan1
Posts: 16
Joined: 2021-11-10 20:44
Has thanked: 1 time
Been thanked: 1 time

PuTTY closes before connection established.

#1 Post by Spartan1 »

I have Debian v11.1.0 and just downloaded and installed PuTTY rel 0.74.

I have a working Internet connection. Start PuTTY, select Telnet, type in IP Address, adjust Port number, and choose 'Never' for Close window on exit. As soon as I hit 'Open' the PuTTY app immediately closes. No error message is displayed, and I cannot find any log file to give me a clue. A Windows version of this app works fine on another machine, so I know the IP Address and Port number are good.

Any clues as to what is wrong?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: PuTTY closes before connection established.

#2 Post by p.H »

Try to start putty from a terminal emulator, maybe that will show some message.
By the way, why don't you just use telnet in a terminal ?

Spartan1
Posts: 16
Joined: 2021-11-10 20:44
Has thanked: 1 time
Been thanked: 1 time

Re: PuTTY closes before connection established.

#3 Post by Spartan1 »

Thanks for reply.

I have ZERO knowledge regarding Linux, for me it's purely a means to an end.

I have no idea how to start PuTTY from a terminal emulator, so any help with that, in simple language, would be most helpful.

Why don't I just use Telnet in a terminal? Didn't know I could! However, the reason for using PuTTY is to try and get a USB-to-Serial port convertor working under Linux. (It doesn't, and I don't know how to discover what the port number, address or IRQ is.)

And yes, just tried Telnet from terminal and that works ok. Now to get PuTTY working...

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: PuTTY closes before connection established.

#4 Post by p.H »

Spartan1 wrote: 2021-11-14 14:40 I have no idea how to start PuTTY from a terminal emulator
Open a terminal emulator (xterm, rxvt, lxterminal, gnome-terminal, konsole...).
Type "putty" and press enter.
Spartan1 wrote: 2021-11-14 14:40 the reason for using PuTTY is to try and get a USB-to-Serial port convertor working under Linux.
You don't use the telnet protocol for that. Or is this an entirely different use of putty from above ?
Spartan1 wrote: 2021-11-14 14:40 (It doesn't, and I don't know how to discover what the port number, address or IRQ is.)
A USB serial (UART) adapter is seen as /dev/ttyUSB0 (or 1, 2...). Set a serial terminal emulators such as putty, picocom, minicom or cutecom with this device name and usual parameters (bitrate, parity...)

Spartan1
Posts: 16
Joined: 2021-11-10 20:44
Has thanked: 1 time
Been thanked: 1 time

Re: PuTTY closes before connection established.

#5 Post by Spartan1 »

Thanks p.H.

Ok, so somehow I managed to download and install Xterm!
Open PuTTY within Xterm, select Telnet, type in IP Address and Port number, and hit Open. Then PuTTY abruptly closes without connecting, just as before.

Thank you, yes, I appreciate that Telnet is not required for that purpose. I was just using Telnet to establish that PuTTY was working. It's not, hence my post!

I will be using the USB-to-Serial port device with another application. In order to configure that application, I will need to know if it's COM1, COM2, etc., its address or I/O range, e.g. 03F8, 02F8, etc., and the IRQ, 4, 3, 5, etc., etc.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: PuTTY closes before connection established.

#6 Post by p.H »

Spartan1 wrote: 2021-11-14 17:06 I managed to download and install Xterm
Usually a desktop environment already comes with a terminal emulator (Gnome has gnome-terminal, KDE hasa konsole, LXDE has lxterminal...) so you did not have to install one more.

Spartan1 wrote: 2021-11-14 17:06 Open PuTTY within Xterm, select Telnet, type in IP Address and Port number, and hit Open. Then PuTTY abruptly closes without connecting, just as before.
Of course. Launching putty from the terminal was not supposed to change this. It was intended to watch if some error message was printed in the terminal when putty crashed.
Spartan1 wrote: 2021-11-14 17:06 Thank you, yes, I appreciate that Telnet is not required for that purpose. I was just using Telnet to establish that PuTTY was working. It's not, hence my post!
Your post is a typical case of "XY problem" : in order to solve X, you try and fail to use method Y so you post about Y whereas your actual problem is about X.
Spartan1 wrote: 2021-11-14 17:06 I will be using the USB-to-Serial port device with another application. In order to configure that application, I will need to know if it's COM1, COM2, etc., its address or I/O range, e.g. 03F8, 02F8, etc., and the IRQ, 4, 3, 5, etc., etc.
No, you don't. Not with Linux. COM1, COM2... are a DOS/Window thing. I/O port addresses and IRQ apply only to system devices such as internal 8250/16550 UART controllers. USB is a peripheral bus, not a system bus. Anyway, dealing with hardware stuff is the kernel's duty, not the user's. The kernel exports real devices to userspace as special files in /dev called character or block devices. As I already wrote, USB serial adapters are exported to userspace as /dev/ttyUSB0, /dev/ttyUSB1... That is all you need to know to use it.

Spartan1
Posts: 16
Joined: 2021-11-10 20:44
Has thanked: 1 time
Been thanked: 1 time

Re: PuTTY closes before connection established.

#7 Post by Spartan1 »

Ok, well knowing nothing about Linux, I wasn't aware that a terminal emulator was included...

I quite thought trying Telnet would be a useful way of testing PuTTY to see if any part of it was working. My bad...

So, when running PuTTY in XTerm, I select Connection type 'Serial', click 'Never' for Close window on exit, then I click 'Open'. Immediately the PuTTY window closes and I'm back to XTerm. The only message that I can see says 'PuTTY: unable to load font "server:fixed"

Ok about I/O ports, etc. When I get it working, what you've told me will enable me to configure my other app.

Trying to understand this system... So, will XTerm enable me to talk directly to the serial device that is connected to my USB-to-Serial adaptor? Or do I still need PuTTY to do that? If so, how? Initializing my serial device produces nothing on the XTerm screen.

dlu2021
Posts: 198
Joined: 2021-08-13 19:55
Location: Minnesota
Has thanked: 7 times
Been thanked: 37 times

Re: PuTTY closes before connection established.

#8 Post by dlu2021 »

Spartan1 wrote: 2021-11-14 20:42 So, when running PuTTY in XTerm, I select Connection type 'Serial', click 'Never' for Close window on exit, then I click 'Open'. Immediately the PuTTY window closes and I'm back to XTerm. The only message that I can see says 'PuTTY: unable to load font "server:fixed"
Have you tried changing the font in the PuTTY app?
Spartan1 wrote: 2021-11-14 20:42 Trying to understand this system... So, will XTerm enable me to talk directly to the serial device that is connected to my USB-to-Serial adaptor? Or do I still need PuTTY to do that? If so, how? Initializing my serial device produces nothing on the XTerm screen.
No, you wouldn't use XTerm to talk directly to the serial port, you would use an separate app to do that.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: PuTTY closes before connection established.

#9 Post by steve_v »

Spartan1 wrote: 2021-11-14 11:40downloaded and installed PuTTY rel 0.74.
With 'apt install putty', not manually downloading it or anything, right? Just checking...
Putty works just fine here, on a fresh bullseye VM.
Spartan1 wrote: 2021-11-14 20:42The only message that I can see says 'PuTTY: unable to load font "server:fixed"
I get that too, It shouldn't be a fatal error (i.e it should fall back to whatever your default fixed-width font is), and indeed putty seems to work here despite it.
Spartan1 wrote: 2021-11-14 20:42will XTerm enable me to talk directly to the serial device that is connected to my USB-to-Serial adaptor?
Not easily at any rate. xterm just gets you the equivalent of a local command line TTY, it knows nothing about serial ports by itself.
Spartan1 wrote: 2021-11-14 20:42do I still need PuTTY to do that? If so, how?
Presumably what you are after is a serial terminal. There are many options, putty is one. I mostly just use GNU screen (e.g. 'screen /dev/ttyUSB0 19200'), but more full-featured TUI applications like minicom, or GUI ones such as cutecom are available in the repos.
You may need to add yourself to whatever group (dialout, IIRC) owns the serial port device node to access it as a normal user.
As for finding which device node is your USB-serial dongle, the easiest option is to check the kernel messages with 'dmesg' just after you plug it in, you should see something like:

Code: Select all

usb 1-2: pl2302 converter now attached to ttyUSB0
dmesg output might also provide some clues as to why putty is crashing, maybe.

Spartan1 wrote: 2021-11-14 20:42Initializing my serial device produces nothing on the XTerm screen.
Initialise how? setserial?
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Spartan1
Posts: 16
Joined: 2021-11-10 20:44
Has thanked: 1 time
Been thanked: 1 time

Re: PuTTY closes before connection established.

#10 Post by Spartan1 »

Tried selecting another font, but PuTTY doesn't save my changes.

Yes, used 'apt install putty'

Can you kindly advise me how to use 'dmesg output' to possibly get clues on why PuTTY is crashing.

Powering on my serial device invariably produces initialisation text on the terminal screen. (Assuming correct baud rate, etc.) Usually, device name, ROM version, etc.

dlu2021
Posts: 198
Joined: 2021-08-13 19:55
Location: Minnesota
Has thanked: 7 times
Been thanked: 37 times

Re: PuTTY closes before connection established.

#11 Post by dlu2021 »

I just had another thought, although it is a bit far fetched. What DE are you running by chance?

My thought process went something like this, if this is your first time using Linux, maybe you went with all of the defaults during the install, which would mean that you are running Gnome, if that is true, then there is a possibility that you could be running Wayland.

So, maybe the problem with PuTTY crashing only happens when you are running it in a Wayland session. That would be easy enough to check, you would just need to log out of the session and when you get back to the login screen, you would click on your user name, and when the password prompt appears, a little gear icon should also appear somewhere on the screen where you can select a different session type, the choice that you want would be called something like "Gnome on xorg". Sorry for being vague, but I don't use Gnome myself (or Wayland).

It was just a thought, and it would only apply if your are running Gnome. If all of this is accurate, then you once you log in with an Xorg session, then you retry PuTTY.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: PuTTY closes before connection established.

#12 Post by steve_v »

dlu2021 wrote: 2021-11-17 02:43maybe you went with all of the defaults during the install, which would mean that you are running Gnome, if that is true, then there is a possibility that you could be running Wayland.
Please tell me bullseye isn't giving users a wayland session by default if they select gnome at install time... That would be a dirty, dirty trap for young players, wayland still breaks far too many things to be the default option.

It would indeed explain putty crashing though.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

dlu2021
Posts: 198
Joined: 2021-08-13 19:55
Location: Minnesota
Has thanked: 7 times
Been thanked: 37 times

Re: PuTTY closes before connection established.

#13 Post by dlu2021 »

steve_v wrote: 2021-11-17 03:59
dlu2021 wrote: 2021-11-17 02:43maybe you went with all of the defaults during the install, which would mean that you are running Gnome, if that is true, then there is a possibility that you could be running Wayland.
Please tell me bullseye isn't giving users a wayland session by default if they select gnome at install time... That would be a dirty, dirty trap for young players, wayland still breaks far too many things to be the default option.
Yes, that is my understanding which has been that way since Buster:

https://wiki.debian.org/Wayland

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: PuTTY closes before connection established.

#14 Post by steve_v »

dlu2021 wrote: 2021-11-17 05:10 Yes, that is my understanding which has been that way since Buster:
Guess it's a good thing I can't stand GNOME (>=3.0 at any rate) then. :P
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Spartan1
Posts: 16
Joined: 2021-11-10 20:44
Has thanked: 1 time
Been thanked: 1 time

Re: PuTTY closes before connection established.

#15 Post by Spartan1 »

Sorry, not got the faintest idea what Desktop Environment I've got! I tried one or two commands to try and establish what it was but didn't get anything back that I understood. Running Debian, so if you can give me the command line, I'll let you know.

It just installed - wasn't aware I was offered choices...

Perhaps Debian wasn't the right choice. I really only want to run two apps, PuTTY and Xrouter...

drclu2020
Posts: 5
Joined: 2020-12-16 21:14

Re: PuTTY closes before connection established.

#16 Post by drclu2020 »

If you are running Gnome then after you have logged in, you should see a black bar across the top of the screen that says "Activities" on left hand side, and has a down arrow (inverted pyramid) on the right side of the black bar.

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: PuTTY closes before connection established.

#17 Post by sunrat »

Spartan1 wrote: 2021-11-18 13:41 Sorry, not got the faintest idea what Desktop Environment I've got! I tried one or two commands to try and establish what it was but didn't get anything back that I understood. Running Debian, so if you can give me the command line, I'll let you know.

It just installed - wasn't aware I was offered choices...
If you installed a DE but didn't select something different, you have the default Gnome. Sorry. :|
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Spartan1
Posts: 16
Joined: 2021-11-10 20:44
Has thanked: 1 time
Been thanked: 1 time

Re: PuTTY closes before connection established.

#18 Post by Spartan1 »

drclu2020 wrote: 2021-11-18 18:47 If you are running Gnome then after you have logged in, you should see a black bar across the top of the screen that says "Activities" on left hand side, and has a down arrow (inverted pyramid) on the right side of the black bar.
Yes, this is what I see... I guess I need to choose a different install. Something simple, and something that will work with Xrouter and PuTTY!

dlu2021
Posts: 198
Joined: 2021-08-13 19:55
Location: Minnesota
Has thanked: 7 times
Been thanked: 37 times

Re: PuTTY closes before connection established.

#19 Post by dlu2021 »

Spartan1 wrote: 2021-11-22 16:21 Yes, this is what I see... I guess I need to choose a different install. Something simple, and something that will work with Xrouter and PuTTY!
No, you shouldn't to reinstall anything, you can try the following first:

You would just need to log out of the session and when you get back to the main login screen, you would click on your user name, and when the password prompt appears, a little gear icon should also appear somewhere on the screen where you can select a different session type, the choice that you want would be called something like "Gnome on xorg". Sorry for being vague, but I don't use Gnome myself (or Wayland).

trinidad
Posts: 290
Joined: 2016-08-04 14:58
Been thanked: 14 times

Re: PuTTY closes before connection established.

#20 Post by trinidad »

Tried selecting another font, but PuTTY doesn't save my changes.
https://askubuntu.com/questions/1255916 ... untu-20-04
So, maybe the problem with PuTTY crashing only happens when you are running it in a Wayland session
Has nothing to do with this specific problem.
will XTerm enable me to talk directly to the serial device that is connected to my USB-to-Serial adaptor
Not necessarily. Depends on what the device is. I can't figure out what your network topography looks like: what's connected to what and what you are attempting to connect to what with what.

If you are working from Windows use SSH and powershell if all you're trying to do is configure a USB attached to a remote Linux system.
https://lazyadmin.nl/powershell/powershell-ssh/

TC
You can't believe your eyes if your imagination is out of focus.

Post Reply