LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-15-2009, 04:50 AM   #1
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Rep: Reputation: 55
telnet login


Hi all...

I am trying to login to remote server through telnet....

Code:
[vinay@localhost webhuddle]$ telnet 172.21.109.60
Trying 172.21.108.65...
Connected to 172.21.108.65.
Escape character is '^]'.

linux login: root
Password: 
You have new mail in /var/mail/root.
Last login: Tue Dec 15 04:13:08 from 172.17.70.143
linux:~ #
Is there any way to remove the blank line which is coming after Escape character is '^]'.

I commented line in /etc/issue.net
Code:
#Welcome to SUSE LINUX Enterprise Server 9 (i586) - Kernel %r (%t).
Earlier I was getting this message also..Now i am not getting this message...This is fine..But how to remove the blank line after Escape character is '^]'.

Thanks in advance.....

Last edited by vinaytp; 12-15-2009 at 04:58 AM.
 
Old 12-15-2009, 05:39 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by vinaytp View Post
Hi all...

I am trying to login to remote server through telnet....

Code:
[vinay@localhost webhuddle]$ telnet 172.21.109.60
Trying 172.21.108.65...
Connected to 172.21.108.65.
Escape character is '^]'.

linux login: root
Password: 
You have new mail in /var/mail/root.
Last login: Tue Dec 15 04:13:08 from 172.17.70.143
linux:~ #
Is there any way to remove the blank line which is coming after Escape character is '^]'.

I commented line in /etc/issue.net
Code:
#Welcome to SUSE LINUX Enterprise Server 9 (i586) - Kernel %r (%t).


Earlier I was getting this message also..Now i am not getting this message...This is fine..But how to remove the blank line after Escape character is '^]'.

Thanks in advance.....

You have blank lines under the welcome message. Remove them...
 
Old 12-15-2009, 06:36 AM   #3
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by centosboy View Post
You have blank lines under the welcome message. Remove them...
No.. I dont have any blank lines..
vim /etc/issue.net
Code:
#Welcome to SUSE LINUX Enterprise Server 9 (i586) - Kernel %r (%t).
~
~
I am struggling ...please help me....
 
Old 12-15-2009, 07:50 AM   #4
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Original Poster
Rep: Reputation: 55
Is it possible to remove the blank line above linux login: root
?

Can anyone suggest about this...
 
Old 12-15-2009, 08:29 AM   #5
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by vinaytp View Post
Is it possible to remove the blank line above linux login: root
?

Can anyone suggest about this...
are you using a .telnetrc file anywhere?
 
Old 12-15-2009, 08:38 AM   #6
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by centosboy View Post
are you using a .telnetrc file anywhere?
Thanks for your replys centosboy...

I am not using .telnetrc file anywhere..I have to get rid of the blank line which is getting printed ?
 
Old 12-15-2009, 08:45 AM   #7
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by vinaytp View Post
Thanks for your replys centosboy...

I am not using .telnetrc file anywhere..I have to get rid of the blank line which is getting printed ?
im not sure...
have you tried completely blanking out /etc/issue.net?
i cant really test this now as im not in front of a suse machine. maybe if you have not got it sorted by the time i get home i can check it...
 
Old 12-15-2009, 08:47 AM   #8
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Make sure there is no Carrier return at the beginning of
/etc/issue.net

Code:
cannabis:/home/repo# cat /etc/issue.net 
Debian GNU/Linux squeeze/sid
cannabis:/home/repo# telnet 127.0.0.1
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Debian GNU/Linux squeeze/sid
cannabis login: Connection closed by foreign host.

cannabis:/home/repo# cat /etc/issue.net 

Debian GNU/Linux squeeze/sid
cannabis:/home/repo# telnet 127.0.0.1
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

Debian GNU/Linux squeeze/sid
cannabis login: Connection closed by foreign host.
cannabis:/home/repo#
BTW, you should use ssh instead of telnet
 
Old 12-15-2009, 08:51 AM   #9
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by repo View Post
Make sure there is no Carrier return at the beginning of
/etc/issue.net

Code:
cannabis:/home/repo# cat /etc/issue.net 
Debian GNU/Linux squeeze/sid
cannabis:/home/repo# telnet 127.0.0.1
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Debian GNU/Linux squeeze/sid
cannabis login: Connection closed by foreign host.

cannabis:/home/repo# cat /etc/issue.net 

Debian GNU/Linux squeeze/sid
cannabis:/home/repo# telnet 127.0.0.1
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

Debian GNU/Linux squeeze/sid
cannabis login: Connection closed by foreign host.
cannabis:/home/repo#
BTW, you should use ssh instead of telnet
Code:
cannabis:/home/repo# cat /etc/issue.net
 
Old 12-15-2009, 09:17 AM   #10
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by centosboy View Post
Code:
cannabis:/home/repo# cat /etc/issue.net
Thanks Centosboy for your reply....

I found \n at the end of line
Code:
linux:~ # od -tc /etc/issue.net 
0000000   #   W   e   l   c   o   m   e       t   o       S   U   S   E
0000020       L   I   N   U   X       E   n   t   e   r   p   r   i   s
0000040   e       S   e   r   v   e   r       9       (   i   5   8   6
0000060   )       -       K   e   r   n   e   l       %   r       (   %
0000100   t   )  \n
0000103
But i removed \n using

Code:
tr -d '\012'  < /etc/issue.net > test.txt
cp test.txt issue.net
Now \n got removed form end, But issue remains the same...

Whereas, it works when there is no # at the beggining of the line /etc/issues.net like
Code:
linux:~ # od -tc /etc/issue.net
0000000   W   e   l   c   o   m   e       t   o       S   U   S   E    
0000020   L   I   N   U   X       E   n   t   e   r   p   r   i   s   e
0000040       S   e   r   v   e   r       9       (   i   5   8   6   )
0000060       -       K   e   r   n   e   l       \   r       (   \   l
0000100   )   .  \n
0000103
linux:~ #
And i removed \n in the same way as is did before...
This time it is working, but Message Welcome to SUSE LINUX Enterprise Server 9 (i586) - Kernel \r (\l).
is printing since hash is removed, My requirement is not to print message and blank line...Simultaneously both are not working....

Hope you help me with this...Thanks once again...

Waiting with anticipation.....

Last edited by vinaytp; 12-15-2009 at 09:19 AM.
 
Old 12-15-2009, 09:21 AM   #11
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by vinaytp View Post
Thanks Centosboy for your reply....

I found \n at the end of line
Code:
linux:~ # od -tc /etc/issue.net 
0000000   #   W   e   l   c   o   m   e       t   o       S   U   S   E
0000020       L   I   N   U   X       E   n   t   e   r   p   r   i   s
0000040   e       S   e   r   v   e   r       9       (   i   5   8   6
0000060   )       -       K   e   r   n   e   l       %   r       (   %
0000100   t   )  \n
0000103
But i removed \n using

Code:
tr -d '\012'  < /etc/issue.net > test.txt
cp test.txt issue.net
Now \n got removed form end, But issue remains the same...

Whereas, it works when there is no # at the beggining of the line /etc/issues.net like
Code:
linux:~ # od -tc /etc/issue.net
0000000   W   e   l   c   o   m   e       t   o       S   U   S   E    
0000020   L   I   N   U   X       E   n   t   e   r   p   r   i   s   e
0000040       S   e   r   v   e   r       9       (   i   5   8   6   )
0000060       -       K   e   r   n   e   l       \   r       (   \   l
0000100   )   .  \n
0000103
linux:~ #
And i removed \n in the same way as is did before...
This time it is working, but Message Welcome to SUSE LINUX Enterprise Server 9 (i586) - Kernel \r (\l).
is printing since hash is removed, My requirement is not to print message and blank line...Simultaneously both are not working....

Hope you help me with this...Thanks once again...

Waiting with anticipation.....
this is not the best solution...but can you try with issue.net completely empty?? just back up the original..
 
Old 12-15-2009, 09:23 AM   #12
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by repo View Post
Make sure there is no Carrier return at the beginning of
/etc/issue.net

Code:
cannabis:/home/repo# cat /etc/issue.net 
Debian GNU/Linux squeeze/sid
cannabis:/home/repo# telnet 127.0.0.1
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Debian GNU/Linux squeeze/sid
cannabis login: Connection closed by foreign host.

cannabis:/home/repo# cat /etc/issue.net 

Debian GNU/Linux squeeze/sid
cannabis:/home/repo# telnet 127.0.0.1
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

Debian GNU/Linux squeeze/sid
cannabis login: Connection closed by foreign host.
cannabis:/home/repo#
BTW, you should use ssh instead of telnet
Dear repo,

Thanks for suggestion...

In your case it is working fine because it is printing some message when you login, please try to comment contents of /etc/issue.net and try...I hope it will give a blank line even if you remove \n at the end..
 
Old 12-15-2009, 09:27 AM   #13
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
In your case it is working fine because it is printing some message when you login, please try to comment contents of /etc/issue.net and try...I hope it will give a blank line even if you remove \n at the end..
with comment contents of /etc/issue.net

Quote:
cannabis:/home/repo# cat /etc/issue.net
#Debian GNU/Linux squeeze/sid
cannabis:/home/repo# telnet 127.0.0.1
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
cannabis login: ^CConnection closed by foreign host.
cannabis:/home/repo#
 
Old 12-15-2009, 09:29 AM   #14
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by centosboy View Post
this is not the best solution...but can you try with issue.net completely empty?? just back up the original..
Dear Centosboy,

I have not got the solution yet...I dont want to print either message or blank line

I have tried by making the file empty...It doesn't work...same blank line will appear..

Finally I removed /etd/issue.net and i tried
Code:
[vinay@localhost webhuddle]$ telnet 172.21.109.60
Trying 172.21.109.60...
Connected to 172.21.109.60.
Escape character is '^]'.

Linux 2.6.5-7.97-default (linux) (4)


linux login:
I dont know from where the message Linux 2.6.5-7.97-default (linux) (4)is coming ?

Any help ?
 
Old 12-15-2009, 09:30 AM   #15
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by vinaytp View Post
Dear Centosboy,

I have not got the solution yet...I dont want to print either message or blank line

I have tried by making the file empty...It doesn't work...same blank line will appear..

Finally I removed /etd/issue.net and i tried
Code:
[vinay@localhost webhuddle]$ telnet 172.21.109.60
Trying 172.21.109.60...
Connected to 172.21.109.60.
Escape character is '^]'.

Linux 2.6.5-7.97-default (linux) (4)


linux login:
I dont know from where the message Linux 2.6.5-7.97-default (linux) (4)is coming ?

Any help ?
/etc/issue?

like i said i cant really test as no suse...but im sure it cant be that much different from centos?
 
  


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
Telnet Login _ AsiF Linux - Networking 8 01-10-2008 06:50 PM
telnet auto-login anthjaz Linux - Networking 15 11-04-2003 01:28 PM
telnet - banner but no login? polo76 Linux - General 2 06-23-2003 09:30 AM
can't login through telnet but can on console jnusbaum Linux - Newbie 2 02-18-2002 12:05 PM
Root login to telnet sarmadys Linux - Security 6 01-24-2002 01:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:11 PM.

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