LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 06-24-2006, 07:49 PM   #1
lt_wentoncha
Member
 
Registered: Apr 2005
Posts: 42

Rep: Reputation: 15
Can't SSH


Hi all,

I just did an FTP install for Mandriva 2006. However, I can't ssh to the server. I can ssh @localhost but can't from the outside. SSH is enabled in the firewall, and in the menu where one can choose services to run @ boot it's ticked on to start. Any tips?

Thanks.
 
Old 06-24-2006, 08:53 PM   #2
kvedaa
Member
 
Registered: Mar 2004
Location: Virginia
Distribution: PacketProtector
Posts: 331

Rep: Reputation: 30
When you attempt to ssh to the machine from another system, does the connection simply fail to connect, or are you just unable to authenticate?

Do you have physical access to the system in question? If so, do you have access to another system on the same network segment, can you ssh to this server from said system?

Happy Hunting,
 
Old 06-24-2006, 09:20 PM   #3
lt_wentoncha
Member
 
Registered: Apr 2005
Posts: 42

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by kvedaa
When you attempt to ssh to the machine from another system, does the connection simply fail to connect, or are you just unable to authenticate?

Do you have physical access to the system in question? If so, do you have access to another system on the same network segment, can you ssh to this server from said system?

Happy Hunting,
From a SuSE box and from my XP box over PuTTY, I get a "Server unexpectedly closed connection".

Thanks.
 
Old 06-24-2006, 09:45 PM   #4
kvedaa
Member
 
Registered: Mar 2004
Location: Virginia
Distribution: PacketProtector
Posts: 331

Rep: Reputation: 30
I assume that their is no firewall between these clients and your server.

Are you accessing the system by host name or IP address? May I suggest that you attempt to establish the ssh connection using an account other than root?

Might I suggest using the -vvv switch and posting the results. (i.e. ssh -vvv user@1.1.1.1 )

Happy Hunting,
 
Old 06-24-2006, 10:42 PM   #5
lt_wentoncha
Member
 
Registered: Apr 2005
Posts: 42

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by kvedaa
I assume that their is no firewall between these clients and your server.

Are you accessing the system by host name or IP address? May I suggest that you attempt to establish the ssh connection using an account other than root?

Might I suggest using the -vvv switch and posting the results. (i.e. ssh -vvv user@1.1.1.1 )

Happy Hunting,
Thanks for the help.

No luck:

OpenSSH_4.2p1, OpenSSL 0.9.8a 11 Oct 2005
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host

I don't understand why Mandriva shuts it off. No firewall other than the one on Mandriva, SSH is ticked, and ps and netstat ssh is running and being listened for on 22.

Thanks again.

xxx is the server's ip address.

Last edited by lt_wentoncha; 06-24-2006 at 10:59 PM.
 
Old 06-24-2006, 11:09 PM   #6
kvedaa
Member
 
Registered: Mar 2004
Location: Virginia
Distribution: PacketProtector
Posts: 331

Rep: Reputation: 30
You may wish to take a look at:

http://www.snailbook.com/faq/libwrap-oops.auto.html

It refers to one possible solution being a modification to either the:

/etc/host.allow

or

/etc/host.deny

I also have heard people blame this error on an excess of hung ssh sessions, so it may be worth while to attemt to stop and start the sshd to see if this has any impact.

Happy Hunting,
 
Old 06-24-2006, 11:48 PM   #7
lt_wentoncha
Member
 
Registered: Apr 2005
Posts: 42

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by kvedaa
You may wish to take a look at:

http://www.snailbook.com/faq/libwrap-oops.auto.html

It refers to one possible solution being a modification to either the:

/etc/host.allow

or

/etc/host.deny

I also have heard people blame this error on an excess of hung ssh sessions, so it may be worth while to attemt to stop and start the sshd to see if this has any impact.

Happy Hunting,
Success! Much obliged, mate.
 
Old 06-24-2006, 11:48 PM   #8
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
add sshd2 : All
or
sshd2 : x.x.x.x

where x.x.x.x is you winbox ip to your hosts.allow file
 
Old 06-25-2006, 12:09 AM   #9
lt_wentoncha
Member
 
Registered: Apr 2005
Posts: 42

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by prozac
add sshd2 : All
or
sshd2 : x.x.x.x

where x.x.x.x is you winbox ip to your hosts.allow file
Thanks, I actually put x.x.x., for all the hosts on the LAN. Now I'm wondering, how tightly is Mandriva locked up?
 
Old 06-25-2006, 12:17 AM   #10
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
Quote:
Originally Posted by lt_wentoncha
Now I'm wondering, how tightly is Mandriva locked up?
you should know the answer for that more than us. also you can try

https://www.grc.com/x/ne.dll?bh0bkyd2

read the page for more info on how it checks your comp for any vulnerability and also any legal issues concerned.
 
Old 06-25-2006, 04:08 AM   #11
lt_wentoncha
Member
 
Registered: Apr 2005
Posts: 42

Original Poster
Rep: Reputation: 15
Well,

For some reason, everytime I close emacs, the original line for sshd.deny overwrites any of my changes and reverts to the original below:

ALL:EXCEPT 127.0.0.1ENY

Any thoughts?

Thanks.
 
Old 06-25-2006, 04:48 AM   #12
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Make sure you edit the file as root, so you can save the changes.

Also, did you generate a key-pair on the server ( ssh-keygen ). Also, make sure that the service is running, and port 22 is open, unless you configured it to use a different port.

One thing that can cause this error is if you performed a fresh install on a host, and so the key pair is different then the last time you connected to the server. If this is the case, delete the entry from the ~/.ssh/known_hosts file. Or if the servers key pair is changed, delete the server's known_hosts entry from your remote hosts.

I would recommend that you always log in as a user and disable root login. If only one user logs into the server using ssh, then consider adding your username to the AllowUsers entry in /etc/ssh/sshd_config. This will forbid any other user from logging in. You can add more users to the end of this line, or use AllowGroups instead. If there is an AllowUsers entry, then this will trump any AllowGroups entry. If you use AllowUsers, you don't have to list each system user to deny.

Last edited by jschiwal; 06-25-2006 at 04:52 AM.
 
Old 06-26-2006, 11:42 PM   #13
Jzarecta
Member
 
Registered: Dec 2005
Location: Villahermosa, Bucharest, Birminham, Brooklyn, Beverly
Distribution: Mandriva
Posts: 118

Rep: Reputation: 15
Quote:
Originally Posted by lt_wentoncha
Thanks, I actually put x.x.x., for all the hosts on the LAN. Now I'm wondering, how tightly is Mandriva locked up?
Well mandriva has a security levels the Paranoic level is pretty locked up firewall.

DrakSec is a very nice description for the different levels.
 
  


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
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
Mac OS X ssh client / linux sshd : ssh hangs/disconnects Apollo77 Linux - Networking 1 05-24-2006 11:53 AM
ssh -> perl -> spawn background proces hangs ssh session rhoekstra Programming 2 04-25-2006 01:05 AM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

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