LinuxQuestions.org
Visit Jeremy's Blog.
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 11-27-2007, 05:50 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 504

Rep: Reputation: 31
remote telnet without password


Dear friends ,

I want to telnet another server without pressing any "username" and "password" .

I can ftp to another server using following cpmmand :

lflt rootasswd@192.168.10. << !

Like the above way, can I telnet remote server ? If it is possible , then plz help me .. ...
 
Old 11-27-2007, 06:28 AM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
You can use ssh instead of telnet, and configure public key authentication. That is the "proper" way to do it.

If you want to incur the wrath of all self-respecting nerds who care about security (and all nerds should care about security), you can write a small script using expect to automate telnet logins and then pass control back to the user.

A typical expect script would look something like this:
Code:
#!/usr/bin/expect

spawn "telnet" "the.host.machine"

expect "Login:"
send "youruser\r"
expect "Password:"
send "yourpassword\r"
expect "Login successful"
interact
There are two main problems with this approach:
  • telnet send the login credentials un-encrypted, so anyone who can see network traffic along the route to the remote host can sniff your password with minimal effort. For this reason, telnet should really be avoided whenever possible.
  • you have to store the username and password in a script. This might seem like no big deal, but it is. Firstly it's a security risk. That password is written to the drive. Someone may get access to the file and read it, or they may get hold of the disk after it is decommissioned, and get the password, even if the drive has been wiped - it is still possible to recover data from "deleted" disks a lot of the time...
    A more immediate problem is maintainability. If you write one script to do this, you will probably write another. And another. Sooner or later you end up with dozens of scripts, scattered all over the place, and then... you need to change your password and it is a nightmare to update everything.

So my advice is do not use expect/telnet. Not that I expect you follow this advice (get it? expect? -nevermind)...
 
1 members found this post helpful.
Old 11-27-2007, 07:43 AM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
I agree, and advice you to stay out of telnet when possible, and moreover never store/write your username/passwords in cleartext to any files nor commands. If it was ok, your Linux would never hide the password you are typing, your Windows would never print asterisks when you're typing a password, and we wouldn't need ssh nor public key authentication.

So, shortly said:
- telnet is easy, but so is ssh - just as easy
- telnet is convenient, you don't need any fancy public keys generated! And anybody who wants can capture the packets you send/receive, and see everything in plain text, your passwords and all
- expect is nice, you can automate your logins - and basically hand over your login information to anyone who is able to break into your account (or in telnet's case just capture the packages with any one of the simple tools freely available on the net, possibly preinstalled on their OS too)
- if you have no valuable information to exchange, you don't need to connect to the other end
- if you do connect to the other end, you have some valuable information you'd like to send or receive, and you wouldn't want everybody to be able to do that; this is why you want to secure the connection, and not use the most unsecure options available
- after configuring ssh it's just as easy to use as telnet (or anything), so there is no sane reason not to do it
 
Old 11-27-2007, 09:07 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Quote:
Originally Posted by b0uncer View Post
- after configuring ssh it's just as easy to use as telnet (or anything), so there is no sane reason not to do it
You're quite right, and yet so many people are reluctant to use it for some reason. I think the usual reason for this is that they are not the admin on one or both machines, and think that if they ask for ssh or sshd to be installed it will be too much hassle.

The failure of understanding in this case is how much hassle it will be to get another job when their shortcut leads to a security compromise...
 
Old 11-27-2007, 04:35 PM   #5
blueCow
Member
 
Registered: Feb 2004
Location: Florida
Distribution: FreeBSD, CentOS, Debian, Mint
Posts: 111

Rep: Reputation: 17
I cannot believe anyone is still using telnet. For one, its not enabled by default on any modern system anymore. So you have to be savvy enough to edit your inetd.conf to enable it. If you know this much you should definitely be using openssh (or the ssh server of your choice). If typing passwords is not your thing, setting up public key authentication is ridiculously easy. It's a total of 7-8 commands.
 
Old 08-30-2017, 12:32 PM   #6
ernieskaggs
LQ Newbie
 
Registered: Aug 2017
Posts: 1

Rep: Reputation: Disabled
Answer the question

Jesus, just answer the [removed] question or shut the [removed] up. No one cares about what a proper system administrator should do. The question is how do you enable telenet without a password in linux. No one gives a [removed] about why you shouldn't.
 
Old 08-30-2017, 12:49 PM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by ernieskaggs View Post
Jesus, just answer the [removed] question or shut the [removed] up. No one cares about what a proper system administrator should do. The question is how do you enable telenet without a password in linux. No one [removed] a shit about why you shouldn't.
Did you happen to notice that this thread had been closed for TEN YEARS before you reopened it? And the question was answered, and a script was even provided to do what they wanted.

And while YOU may not care, many others come here to actually learn to do what's right. Telnet shouldn't be used in the manner asked for, that's why SSH is around.

Last edited by rtmistler; 08-31-2017 at 07:05 AM. Reason: Removed copied profanity
 
Old 08-30-2017, 12:54 PM   #8
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
@ernieskaggs Additionally, the behavior and language you exhibited in your first post isn't acceptable at LQ. If you'd like to continue participating here, you'll need to refrain from it moving forward.

--jeremy
 
Old 08-30-2017, 02:52 PM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
So far as I am aware, telnet does not have a "password free" feature. But, ssh does, and it basically does the same thing.

But be aware that you should exclude password-prompting as an option, so that in order to connect you must have an authorized-key and so that ssh will not invite you to enter a password if you don't. To enter, you must possess a key.

(As I have previously mentioned, you should use OpenVPN with tls-auth and unique digital certificates as your outer bastion, allowing reach to "ssh" only if you have successfully passed through the tunnel. This will conceal the existence of the tunnel, presenting to the public a system with "no open ports." Those who possess non-revoked credentials may pass through the secret door easily. All others cannot even discover its existence.)
 
Old 08-30-2017, 03:09 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Old post.

11-27-07, 05:50 AM
 
Old 08-30-2017, 03:15 PM   #11
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
@jefro, this was already pointed out in post #7.

--jeremy
 
Old 08-30-2017, 06:59 PM   #12
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Tried to limit more from posting.

Can you edit post #7?

Pretty sure we know who this new user is.

Last edited by jefro; 08-30-2017 at 07:33 PM.
 
Old 08-31-2017, 07:42 AM   #13
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by jefro View Post
Tried to limit more from posting.

Can you edit post #7?

Pretty sure we know who this new user is.
What do I need to edit in post #7, exactly?
 
Old 08-31-2017, 12:42 PM   #14
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by TB0ne View Post
What do I need to edit in post #7, exactly?
It's been taken care of and I did not alter your part of the post TB0ne, however please be aware that when you quote a profane post, edits to the original post, which I believe Jeremy did, do not transfer automatically over to the quoted one which resided as part of your post. As a result, a few members cited, quite reasonably, that the offending language needed to be removed from the quote within there.

No biggie, however people should try to be aware of that little detail.

I will add that with a questionable question, such as an incomplete one, or something else, I do find it helpful to quote the poster, because if they edit later, as some people do, it confuses things.

And ernieskaggs, welcome to LQ. Please watch the language in the future, and as you can see, there are open threads sometimes which are years past and updates to them may be helpful, or may not be. Looking forward to seeing you on other discussions which are more current.
 
1 members found this post helpful.
Old 08-31-2017, 12:43 PM   #15
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by rtmistler View Post
It's been taken care of and I did not alter your part of the post TB0ne, however please be aware that when you quote a profane post, edits to the original post, which I believe Jeremy did, do not transfer automatically over to the quoted one which resided as part of your post. As a result, a few members cited, quite reasonably, that the offending language needed to be removed from the quote within there.

No biggie, however people should try to be aware of that little detail.

I will add that with a questionable question, such as an incomplete one, or something else, I do find it helpful to quote the poster, because if they edit later, as some people do, it confuses things.

And ernieskaggs, welcome to LQ. Please watch the language in the future, and as you can see, there are open threads sometimes which are years past and updates to them may be helpful, or may not be. Looking forward to seeing you on other discussions which are more current.
Ahhhh......you are indeed correct, and my apologies. I should have either quick-replied or edited my post. COMPLETELY missed that.
 
  


Reply

Tags
authentication, automation, expect, key, login, public, ssh



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
Wish to know about how to do remote login through telnet sharad Linux - Networking 1 03-08-2006 08:12 AM
Password through telnet Ephracis Programming 9 12-16-2004 04:21 PM
remote telnet/ssh sorcerer980 Linux - Newbie 3 07-03-2003 12:03 AM
enable remote telnet heathpitts Linux - Newbie 6 06-11-2003 01:34 PM
Telnet remote assistance? CodeCobalt Linux - General 2 11-08-2002 11:40 PM

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

All times are GMT -5. The time now is 10:15 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