Sponsored Content
Full Discussion: telnet client and logs
Operating Systems Linux telnet client and logs Post 302540081 by Elyas_cr on Tuesday 19th of July 2011 01:40:12 PM
Old 07-19-2011
Question telnet client and logs

Hello everyone. I have a script that telnets into a linux workstation and restarts a service, while logging the session to a file. I'm kind of new to linux so when I was using windows I would capture something like

windows cli: telnet xxx.xxx.xxx.xxx -f c:/capture.log
...
[me@remote]# /sbin/service dhcpd restart
Shutting down dhcpd: OK]
Starting dhcpd: OK]

Now when using the linux telnet client I capture something like

[me@local]# telnet xxx.xxx.xxx.xxx | tee -a /users/me/capture.log
...
[me@remote]# /sbin/service dhcpd restart
Shutting down dhcpd: [60G[ [0;32mOK[0;39m ]
Starting dhcpd: [60G[ [0;32mOK[0;39m ]

It looks like the telnet session is passing control characters or something like that to the log file, which messes up some scripts that check whether the service was succesfully restarted.
I've already tried playing around with the telnet mode (line vrs char) with no effect. Any ideas on how to get the log with just plain text?

Thanks for any advice and sorry if I posted in the wrong place.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Using telnet client from MacOSX's command line terminal

I'm completely new to Unix, but familiar with Mac OSX. I've just discovered the command line terminal feature of this new OS and I'm trying to learn how to telnet into my host's server to change permissions to allow executable cgi scripts for my website. Is there anyone who might be able to... (2 Replies)
Discussion started by: tylerl
2 Replies

2. Programming

Telnet client IP determination

I have configured my firewall to allow only five remote IP's to connect to my server. Upon connection...i would like to automate the Xsession functions for authorized IP's. Mainly, $DISPLAY of the environment to the client. I understand that the "gethostbyaddr" function is capable of this.... (0 Replies)
Discussion started by: thomas.jones
0 Replies

3. Programming

Does Telnet client library exist ?

Hello, I'm new user in this forum, and i'm french ... so excuse me for my english :) In fact, I've to manage several network equipments which can be only configured with the telnet protocol. But using the standalone telnet tool, it's too long and hard. So I'd like to known if a Telnet... (0 Replies)
Discussion started by: aho
0 Replies

4. UNIX for Dummies Questions & Answers

IP address of telnet client

Hi, I am using the telnet client on windowsNT to access the Unix system. I want to find out the IP address of the telnet client from the server side. The reason is I want to set the DISPLAY environment variable when the user is logged on. Is there anyway that the the Unix server can... (1 Reply)
Discussion started by: vtran4270
1 Replies

5. UNIX for Dummies Questions & Answers

SSH logs off and Client pptp goes off as well

Hi , I am a newbie to unix,linux i have a fedora core 4 linux. I had set it up as a pptp vpn client to a windows pptp server. Everything was working fine. Recently i saw that there were many attempts to hack into the root login using ssh. so i changed the ssh port,the ssh portocol to 2. And... (0 Replies)
Discussion started by: qais
0 Replies

6. Linux

viewing ftp client logs

Hi All Is there any linux log file that captures invalid ftp login attempts in client side? I'm trying to come up with a script that will send an email to owners stating the number of invalid password login attempt when logging in to the ftp server. its like, 1. i'm in client side...then... (2 Replies)
Discussion started by: 3rr0r_3rr0r
2 Replies

7. UNIX and Linux Applications

Secure FTP Client that Logs well

Folks I am on a quest.... I am looking for a lightweight FTP client capable of FTPS and or SFTP that has good audit and logging capabilities without requiring a central server component. My platforms are Linux, Solaris, AIX, and Windows Server. The kicker is I have found things that meet the... (3 Replies)
Discussion started by: ArtF
3 Replies

8. Programming

How to program a telnet client?

Hi, Experts: I have programmed a simple telnet client in sco unix 5.0.5, the client has passed throught the initial option negotiation, but I can't receive login prompt from the server. please help me. (8 Replies)
Discussion started by: thinker130
8 Replies

9. UNIX for Advanced & Expert Users

difference between logging into unix through f-secure ssh client and telnet

hi, what is the difference between logging into unix through f-secure ssh client and telnet is there any more security check is involved can any one explain thanks in advance (1 Reply)
Discussion started by: trichyselva
1 Replies

10. Shell Programming and Scripting

If I ran perl script again,old logs should move with today date and new logs should generate.

Appreciate help for the below issue. Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt.............. 1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies
OCF_HEARTBEAT_DHCPD(7)						OCF resource agents					    OCF_HEARTBEAT_DHCPD(7)

NAME
ocf_heartbeat_dhcpd - Chrooted ISC DHCP server resource agent. SYNOPSIS
dhcpd [start | stop | monitor | meta-data | validate-all] DESCRIPTION
Manage an ISC DHCP server service in a chroot environment. SUPPORTED PARAMETERS
config The absolute path to the DHCP server configuration file. (unique, required, string, no default) chrooted Configure the dhcpd service to run in a chrooted or non-chrooted mode. (unique, optional, boolean, default true) chrooted_path The absolute path of the chrooted DHCP environment. (unique, optional, string, default "/var/lib/dhcp") binary The binary for the DHCP server process. An absolute path definition is not required, but can be used to override environment path. (optional, string, default "dhcpd") user The system user the DHCP server process will run as when it is chrooted. (optional, string, default "dhcpd") group The system group the DHCP server process will run as when it is chrooted. (optional, string, default "nogroup") interface The network interface(s) the DHCP server process will bind to. A blank value will bind the process to all interfaces. (optional, string, no default) includes This parameter provides a means to copy include files into the chrooted environment. If a dhcpd.conf file contains a line similar to this: include "/etc/named.keys"; Then an admin also has to tell the dhcpd RA that this file should be pulled into the chrooted environment. This is a space delimited list. (optional, string, no default) leases The leases database file, relative to chrooted_path. (optional, string, default "/db/dhcpd.leases") pid The path and filename of the PID file. It is relative to chrooted_path. (optional, string, default "/var/run/dhcpd.pid") SUPPORTED ACTIONS
This resource agent supports the following actions (operations): start Starts the resource. Suggested minimum timeout: 20. stop Stops the resource. Suggested minimum timeout: 20. monitor Performs a detailed status check. Suggested minimum timeout: 20. Suggested interval: 10. meta-data Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5. validate-all Performs a validation of the resource configuration. Suggested minimum timeout: 20. EXAMPLE
The following is an example configuration for a dhcpd resource using the crm(8) shell: primitive p_dhcpd ocf:heartbeat:dhcpd params config=string op monitor timeout="20" interval="10" depth="0" SEE ALSO
http://www.linux-ha.org/wiki/dhcpd_(resource_agent) AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors) resource-agents UNKNOWN 06/09/2014 OCF_HEARTBEAT_DHCPD(7)
All times are GMT -4. The time now is 02:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy