LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-22-2001, 11:37 AM   #1
Infamous Tim
Member
 
Registered: Mar 2001
Location: Under a Rock
Distribution: Slackware 8.0 with KDE 3.0
Posts: 47

Rep: Reputation: 15
Question


. I've recently set up ssh on my Red Hat 6.0 box, and I want to allow access ONLY through ssh. In order to discourage the use of telnet, I want to post a message when a user first connects to port 23, before the prompt for the login comes up. That way, I can tell users to use ssh on port 22 instead, and also where to get copies of ssh. It won't run login either. The best case scenario would be, the user would read the message, hit a key, and the connection is dropped.
. Is there some way to customize the in.telnetd program to deny logins after sending a message? Or will I need to code a special program for this?

Tim
 
Old 03-22-2001, 01:29 PM   #2
siddiqu
Member
 
Registered: Mar 2001
Location: India
Posts: 332

Rep: Reputation: 30
Hi..

Edit the source code of telnetd daemon and search where he is inserting the issue.net their u add all ur messages and dont run the login program.

ssh we can get from ssh.org or openssh.org
siddiqu.T
 
Old 03-24-2001, 05:20 PM   #3
Infamous Tim
Member
 
Registered: Mar 2001
Location: Under a Rock
Distribution: Slackware 8.0 with KDE 3.0
Posts: 47

Original Poster
Rep: Reputation: 15
???

well, thanks, but where in the telnetd code is the call to login? I spent a while going through it, but I couldn't really find out where it makes the call externally. Also, if it's not going to start up a shell, how would I go about removing all the shell stuff, so it doesn't start up a shell and have to close it all down again?

Tim
 
Old 03-24-2001, 07:43 PM   #4
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,022

Rep: Reputation: 3751Reputation: 3751Reputation: 3751Reputation: 3751Reputation: 3751Reputation: 3751Reputation: 3751Reputation: 3751Reputation: 3751Reputation: 3751Reputation: 3751
Do you use tcpwrappers? If so you can use /etc/hosts.deny to do this. You could also you something like portsentry.
 
Old 03-25-2001, 05:56 PM   #5
aimstr8
Member
 
Registered: Mar 2001
Posts: 40

Rep: Reputation: 15
Tim,

Why not just disable it in /etc/inetd.conf .

Here's a snippet of the format its in:

#:STANDARD: These are standard services.
ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.ftpd
#telnet stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.telnetd
ssh stream tcp nowait root /usr/sbin/tcpd /usr/local/sbin/sshd1 -i


You should always Close Down Unnecessary Services. A good way to find out what's going on is to run the command netstat -vat The output will look something like the following:

root$ netstat -vat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 dsl081-050-241.dsl-:ftp grce.speakeasy.or:3045 ESTABLISHED
tcp 0 0 dsl081-050-241.d:telnet dsl081-00-04-sfo:4169 ESTABLISHED
tcp 0 0 *:1004 *:* LISTEN
tcp 0 0 dsl081-050-241.dsl:1624 cs6.ms.yahoo.com:5050 ESTABLISHED
tcp 0 0 dsl081-050-241.d:telnet dsl81-050-1-sfo:2103 ESTABLISHED
tcp 0 0 *:6000 *:* LISTEN
tcp 0 138 dsl081-050-241.d:telnet dsl081-00-1-sfo:1697 ESTABLISHED
tcp 0 0 dsl081-050-241.d:telnet dsl081-00-14-sfo:1026 ESTABLISHED
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp 0 0 *:www *:* LISTEN
tcp 0 0 *:linuxconf *:* LISTEN
tcp 0 0 *:amidxtape *:* LISTEN
tcp 0 0 *:amandaidx *:* LISTEN
tcp 0 0 *:ftp *:* LISTEN
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How can i broadcast a message to computers connected with Telnet to an Apache server? samy.navab Linux - Newbie 1 08-21-2005 02:08 PM
Telnet and ssh login message digitalgravy Linux - Newbie 7 01-07-2004 10:35 PM
banner message before telnet login digitalgravy Linux - Newbie 3 12-19-2003 02:31 PM
Mandrake 9 - change telnet login message vrillusions Linux - Networking 2 02-03-2003 11:34 PM
modify the telnet header message? doris Linux - Security 1 06-09-2002 01:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration