LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-28-2006, 04:39 AM   #1
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Rep: Reputation: 31
lost ssh access of remote machine RHEL4..How to get it back?


Hi there is a machine RHEL4 which is controlled by ssh. It is remote so can onle be managed by the administrators down here though shell. But after installing an rpm tripwire package I have lost shell access..When I try to connect, it gives me the following error
# ssh 172.17.1.197
ssh: connect to host 172.17.1.197 port 22: Connection refused

Its an production server so its very important to have the ssh access back...How can I get back the access?

Please adivse..Its urgent..

Thank you
Danish
 
Old 07-28-2006, 04:50 AM   #2
fatra2
Member
 
Registered: Feb 2004
Location: Switzerland
Distribution: Fedora - RedHat - Mandrake - OpenSuse
Posts: 216

Rep: Reputation: 35
Hi there,

After installing this "tripwire" rpm, have you looked that the port22 (used by ssh) is still open? Is the deamon (sshd) running? It could be that the port was closed during the installation, or that the deamon was turned off.

If everything seems to be in working order, you can also try accessing, through port22, the machine with the domain name, instead of the IP address. I had to do that once before.
 
Old 07-28-2006, 05:17 AM   #3
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
I tried it with the domain name but its not working..giving me the error name or service not known

#ssh -D 22 [machine_name_with_domain.com]
ssh [machine_name_with_domain.com]: name or service not known..


Also, there is a terminal open which is on my boss's comp to the remote server..and that is working fine..but it is not accepting any new connections...


Thanks

Danish
 
Old 07-28-2006, 05:31 AM   #4
vimal
Red Hat India
 
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 36
Hello dsids,

If you have access to the remote machine only via ssh, you will have to inform the DC or the network admins to work it out and set the connection up for you.

Thanks..
 
Old 07-28-2006, 05:34 AM   #5
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by vimal
Hello dsids,

If you have access to the remote machine only via ssh, you will have to inform the DC or the network admins to work it out and set the connection up for you.

Thanks..
Vimal had been so easy, I wouldve never asked in the forum...sshd is unning on the remote machine...

Thanks
 
Old 07-28-2006, 05:53 AM   #6
vimal
Red Hat India
 
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 36
Quote:
Originally Posted by dsids
Hi there is a machine RHEL4 which is controlled by ssh. It is remote so can onle be managed by the administrators down here though shell. But after installing an rpm tripwire package I have lost shell access..When I try to connect, it gives me the following error
# ssh 172.17.1.197
ssh: connect to host 172.17.1.197 port 22: Connection refused

Its an production server so its very important to have the ssh access back...How can I get back the access?

Please adivse..Its urgent..

Thank you
Danish

Hi dsids,

From your posting above you have said that you had had lost access to the machine via ssh. And from the post it seems that you can only access the machine through SSH. I didn't read your second post, since i opened the page and went for some urgent work and so didnt see the second post come in. So I didn't know about a terminal that is opened from your boss's computer and its running fine. If such a case doesn't exist, then how could you establish a ssh connection with the server? If you have VNC or something like that you could do it ofcourse. So dont think i just saw it simply.....

If you can access the machine via your boss' machine, just check the settings in the tripwire configuration file. Tripwire comes with a tight configuration by default. Wish you good luck....

Thanks....
 
Old 07-28-2006, 06:03 AM   #7
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
Well, the connection with the server was established before installing tripwire. After the installation of tripwire no new connections can be established..My boss even tried to
#ssh localhost

on the remote server but it gave the error..connection refused..
Yes we are checking the tripre cfg file, but BTW I was wondering
would SELinux on the remote RHEL4 server have anything to do with this?

Thanks
Danish
 
Old 07-28-2006, 06:13 AM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
It looks like it is related to tripwire, and SELinux sounds like a red herring (but you may want to come back to it).

I don't know tripwire, but have you checked out the configuration to make sure that isn't your problem?

Can you turn tripwire off?

Last edited by billymayday; 07-28-2006 at 06:23 AM.
 
Old 07-28-2006, 06:30 AM   #9
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
Yes we have uninstalled tripwire rpm and also I did a nmap from my machine using varios kinds if flags

#nmap -sTU ipaddres
#nmap -sF ipaddress
#nmap -sX ipaddress
#namp -sN ipaddress

and it shows no information about port 22, only open ports are mentioned, so Im confused now because a terminal to the remote server
is open but nmap shows no information of port 22...

billymayday....I downloaded the same tripwire rpm pn my system and am trying to go through the cfg file

THanks
Danish
 
Old 07-28-2006, 06:32 AM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Do you want to double check that sshd is still listening with netstat?
 
Old 07-28-2006, 06:45 AM   #11
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
The funny thing is by doing netstat
it shows my boss's ip on port 22


Danish
 
Old 07-28-2006, 06:50 AM   #12
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
yooohhhhhhhooooooooooo!!! it was the damn SELinux. Although something was did which should not have been done, but it was the only way out,

I ran the command

@setenforce 0

and restarted the machine...

and lo! the access the access was back...I knew it was the damn SELinux...


Thank you all very much

Danish
 
Old 07-28-2006, 06:51 AM   #13
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
most probably it was something to do with tripwire..Ill have to go through the cfg file and logs..

Your advise too would be greatly appreciated


Thanks

Danish
 
  


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
Can't SSH to remote machine: Connection closed by remote host Avatar Linux - Networking 35 10-23-2017 12:21 AM
how to open a dilog on local machine when i do ssh to remote machine fahad26 Programming 3 05-03-2005 07:39 PM
ssh not connecting to a remote machine. Eux Debian 5 09-22-2004 04:44 AM
ssh to initiate process on remote machine jdarren Linux - Networking 3 03-23-2004 05:55 PM
can't access to remote machine abd_bela Linux - Security 3 12-29-2002 09:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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