PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.security.ssh > Putty:strange formatting in window output using command file
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.security.ssh SSH secure remote login and tunneling tools.

Putty:strange formatting in window output using command file

Réponse
 
LinkBack Outils de la discussion
Vieux 27/11/2006, 19h50   #1
polypody@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Putty:strange formatting in window output using command file

We have a bunch of different log files on various servers that need
watching, so I created an app to take in the various parameters
(server, log name, location on server), create a command file, and then
start putty and pass it the command file using the -m switch. The
commands run, but the output in the command window is all run together
as if <CR> was replaced with <TAB>. Any ideas on what is happening? A
typical command could be as simple as "ls"

I'm running PuTTy release 0.53b on WinXP, the servers are UNIX/Linux

Thanks in advance,
Sabrina

  Réponse avec citation
Vieux 30/11/2006, 21h14   #2
JohnK
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Putty:strange formatting in window output using command file

On Mon, 27 Nov 2006 11:50:32 -0800, polypody wrote:

> We have a bunch of different log files on various servers that need
> watching, so I created an app to take in the various parameters (server,
> log name, location on server), create a command file, and then start putty
> and pass it the command file using the -m switch. The commands run, but
> the output in the command window is all run together as if <CR> was
> replaced with <TAB>. Any ideas on what is happening? A typical command
> could be as simple as "ls"
>
> I'm running PuTTy release 0.53b on WinXP, the servers are UNIX/Linux
>
> Thanks in advance,
> Sabrina


Just a guess but the putty command is running non-interactively so the
TERM variable isn't set. You could try adding the -t switch for putty or
explicitly setting the TERM variable within your command file.

Any reason you are running an old version?

JohnK
  Réponse avec citation
Vieux 01/12/2006, 16h08   #3
polypody@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Putty:strange formatting in window output using command file


JohnK wrote:
> Just a guess but the putty command is running non-interactively so the
> TERM variable isn't set. You could try adding the -t switch for putty or
> explicitly setting the TERM variable within your command file.
>
> Any reason you are running an old version?


Sheer inertia ;-) I'll try the latest.
Neither -t nor -T had any effect on the output, but thanks for the
suggestion. It's very puzzling, since the actual command that shows up
in the Linux process looks completely innocuous (and if entered in a
regular interactive Putty window, runs fine).

  Réponse avec citation
Vieux 07/12/2006, 14h52   #4
Jacob Nevins
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Putty:strange formatting in window output using command file

polypody@gmail.com writes:
>start putty and pass it the command file using the -m switch. The
>commands run, but the output in the command window is all run together
>as if <CR> was replaced with <TAB>. Any ideas on what is happening? A
>typical command could be as simple as "ls"


My first guess would be that because you are running a command rather
than interactively, a pseudo-terminal is not being allocated, and so
line discipline options relating to the interpretation of line feeds are
not being applied.

That doesn't quite match the symptoms you describe, but I'm not sure I
entirely understand your description. Does the output look like this?:
<http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter4.html#config-crlf>

If so, I think that's your problem, and enabling that option should fix
it.

>I'm running PuTTy release 0.53b on WinXP, the servers are UNIX/Linux


0.53b has several major known security holes. Upgrade to at least 0.57.
(0.58 is the latest.)
  Réponse avec citation
Vieux 08/12/2006, 19h51   #5
polypody@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Putty:strange formatting in window output using command file


Jacob Nevins wrote:

> My first guess would be that because you are running a command rather
> than interactively, a pseudo-terminal is not being allocated, and so
> line discipline options relating to the interpretation of line feeds are
> not being applied.
>
> That doesn't quite match the symptoms you describe, but I'm not sure I
> entirely understand your description. Does the output look like this?:
> <http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter4.html#config-crlf>
>
> If so, I think that's your problem, and enabling that option should fix
> it.


The output looks exactly like the sample in the link you provided.
Now, the trick is to get the command line to accept the "implicit LF in
every CR" setting. There does not appear to be a command-line flag for
this, and I'd rather stay away from requiring a named session to be
invoked since the tool I'm using is for the whole team not just me.
Also, I am curious why, if the "implicit LF" is NOT set in my session
profiles for a dynamic putty window the output looks correct--since the
tool is accessing the same server.

  Réponse avec citation
Vieux 08/12/2006, 19h53   #6
polypody@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Putty:strange formatting in window output using command file


Jacob Nevins wrote:

> My first guess would be that because you are running a command rather
> than interactively, a pseudo-terminal is not being allocated, and so
> line discipline options relating to the interpretation of line feeds are
> not being applied.
>
> That doesn't quite match the symptoms you describe, but I'm not sure I
> entirely understand your description. Does the output look like this?:
> <http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter4.html#config-crlf>
>
> If so, I think that's your problem, and enabling that option should fix
> it.


The output looks exactly like the sample in the link you provided.
Now, the trick is to get the command line to accept the "implicit LF in
every CR" setting. There does not appear to be a command-line flag for
this, and I'd rather stay away from requiring a named session to be
invoked since the tool I'm using is for the whole team not just me.
Also, I am curious why, if the "implicit LF" is NOT set in my session
profiles for a dynamic putty window the output looks correct--since the
tool is accessing the same server.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 13h53.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16099 seconds with 14 queries