LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-20-2003, 08:39 AM   #1
Johnnyboy
LQ Newbie
 
Registered: Sep 2003
Posts: 17

Rep: Reputation: 0
How to disable application(s) using port 22


I'm trying to launch Ventrilo voice communication server using port 22 on my Red Hat 7.2 and I get an error:

ERROR: ServerCreateStream(): bind failed for interface '0.0.0.0'.

I've red that this might be an issue of some other application using the same port.

How can I check what application is using the port 22 and how can I disable it? I'm running linux in text mode.
 
Old 09-20-2003, 09:07 AM   #2
pablob
Member
 
Registered: Apr 2003
Location: Madrid
Distribution: RHEL, Kubuntu, Solaris, TRU64
Posts: 382

Rep: Reputation: 31
Port 22 is usually reserved for 'ssh' (encrypted telnet)

You can see if there is something running by telnetting to port 22:

# telnet localhost 22
# telnet 127.0.0.1 22

If you get:
telnet: Unable to connect to remote host: Connection refused

then nothing is running on that port.

But it seems your Ventrilo Whatever is not well configured, as it is trying to use IP 0.0.0.0 which means nothing.
 
Old 09-20-2003, 10:01 AM   #3
Johnnyboy
LQ Newbie
 
Registered: Sep 2003
Posts: 17

Original Poster
Rep: Reputation: 0
Ok, I got a response:

Connected to localhost
Escape character is '^]'.
SSH-1.99-OpenSSH_2.9p2

So there seems to be ssh-service running at it's default port 22. How do I disable this?
 
Old 09-20-2003, 03:23 PM   #4
SCVirus
LQ Newbie
 
Registered: Sep 2003
Posts: 15

Rep: Reputation: 0
you can disable your ssh but the port will still be reserved and most programs will refuse to use it. just use a high numbered port youll save yourself alot of trouble.
 
Old 09-20-2003, 06:20 PM   #5
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
Only 'root' is allowed to bind an network-socket to a port below 1024. This is an security feature.

To see what you're running: netstat -anpA inet, or without the -n option to see hostnames and port names. If you run this as root, the -p option will tell you what program it is. If you really don't use SSH, you might want to turn it off completely. (with ssh you can login remotely, like telnet, and use a shell, transfer files, but over an encrypted connection)

Last edited by yapp; 09-20-2003 at 06:22 PM.
 
Old 09-21-2003, 03:08 AM   #6
Johnnyboy
LQ Newbie
 
Registered: Sep 2003
Posts: 17

Original Poster
Rep: Reputation: 0
> just use a high numbered port youll save yourself alot of
> trouble.

Well the problem is that I'm behind my ISP's firewall and they let me have only few ports open: http(80), ssh(22). So I'm not able to use high numbered ports. What I have to do is disable SSH-service and configure my Ventrilo so that it uses the port 22. I just don't know how to do it?
 
Old 09-21-2003, 07:05 AM   #7
pablob
Member
 
Registered: Apr 2003
Location: Madrid
Distribution: RHEL, Kubuntu, Solaris, TRU64
Posts: 382

Rep: Reputation: 31
to disable your SSH, probably you have to delete the link to the startup script from the runlevel directory.
I.e.:

In my distro, the ssh startup script is:
/etc/init.d/ssh
and the link to make it active at boot time is:
/etc/rc5.d/SXXssh

(note XX is a number from 00 to 99, which determines the order for the startup. S20ssh would start before S40ssh)

So, to disable SSHd from loading at startup, I just do:

# rm /etc/rc5.d/SXXssh
or
# mv /etc/rc5.d/SXXssh /etc/rc5.d/sXXssh

First you have to know which is your default runlevel (my case, 5 -->rc5.d)
To get to know it, issue:
# runlevel
or
# who -r
 
Old 09-21-2003, 11:18 AM   #8
Johnnyboy
LQ Newbie
 
Registered: Sep 2003
Posts: 17

Original Poster
Rep: Reputation: 0
Now it works, thank you soooo much!
 
  


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 to disable a port, such as 21? iclinux Linux - Networking 2 01-10-2005 05:48 AM
Disable requirement for administrative privilege on a particular application. wahmd Linux - Newbie 2 11-14-2004 11:41 PM
Disable port 3128 cyucuis Linux - Security 6 01-08-2004 03:51 PM
How do I disable a firewire port? rentz Linux - Hardware 0 12-22-2003 04:33 PM
Disable Port 80 dvong3 Linux - Security 2 09-19-2003 09:32 AM

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

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