LinuxQuestions.org
Review your favorite Linux distribution.
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 03-05-2004, 07:49 PM   #1
dt23
Member
 
Registered: Mar 2004
Posts: 30

Rep: Reputation: 15
Question SSH configuration help


Hello,

I'm trying to find information on how to configure ssh on my Mandrake 9.2 box so I can ssh to it from my other Windows box.

Any information would be greatly appreciated.

TIA,
-dt23
 
Old 03-05-2004, 08:08 PM   #2
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
Make sure the OpenSSH daemon (sshd) is installed and running, then download and install an ssh client for Windows. Putty seems to be the most popular and happens to be what I use on my W2K boxes.
 
Old 03-05-2004, 08:10 PM   #3
colnago
Member
 
Registered: Nov 2003
Location: Canada
Distribution: ArchLinux
Posts: 324

Rep: Reputation: 30
You need to enable the service in the control centre under system. I am not sure for 9.2, but in 10 you needed to select either the ssh server package specifically or the general 'newtwork server' group to have the package installed originally.

I assume you do not have it yet. Try 'urpmi openssh-server', if there are complaints, try 'urpmi.update -a' first to update your sources.

These are the 3 packages in Mdk10, if you want to do it by hand:
openssh-3.6.1p2-12mdk
openssh-clients-3.6.1p2-12mdk
openssh-server-3.6.1p2-12mdk

Then just run sshd, '/etc/init.d/sshd start', and you can log in using putty or whatever.

Security wise, you want to check the ssh box in the shorewall config (this is port 22 if you want to add it by hand). In /etc/ssh/ there is a config file where you can do things like block users and such. The file is sshd_config.

For example, i only allow one user to log in, so I have these lines in sshd_config:

DenyUsers all
AllowUsers dt23

The DenyUsers is redundant if you use AllowUsers. In this case, only the user dt23 can log in to my computer via ssh. You can specify specific IP addresses as wel.
 
Old 03-05-2004, 08:20 PM   #4
dt23
Member
 
Registered: Mar 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Thank you for the replies.

sshd is running and I tried logging in from my Windows pc using Putty, but all I get is a black prompt for a few seconds after I click open and then Putty closes.

The service has been enabled under System in the control panel.

When I type 'urpmi openssh-server', I get a response saying that everything is already installed.

Is there anything else that needs to be configured in sshd_config?
I saw that Port 22 was commented out and I uncommented that.

I thought maybe it was a firewall issue but right now the firewall is not activated on the Mandrake machine.

-dt23
 
Old 03-05-2004, 09:15 PM   #5
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
You could try connecting from your Mandy box with "ssh localhost". If that works then it's safe to assume the daemon is running OK, in which case the most likely cause of your problem is on the Windows side. Perhaps you have a firewall running there as well or you haven't configured the putty client correctly. If all else fails, knoppix loads an ssh client and server by default, so makes it easy to test both ways, even with X11 forwarding (which requires commercial software under Windows.) I was playing an OpenGL game using X11 forwarding last night, amazed me; just needed audio forwarding and would have been perfect, hehe.

Anyway, everything worked pretty smoothly for me, so afraid I can't be much help. Maybe someone else here has had similar problems and knows how to resolve them.

Last edited by Crito; 03-05-2004 at 09:17 PM.
 
Old 03-05-2004, 10:26 PM   #6
dt23
Member
 
Registered: Mar 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Interesting... when I 'ssh localhost' on the Mandy (I like that name :P) box, I get a password prompt for localhost... however, when I type the root pw, I get "Permission denied (publickey,password,keyboard-interactive)".

Is there a need to set up a specific password for ssh?

-dt23
 
Old 03-05-2004, 10:51 PM   #7
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
Are you logged in as root? It defaults to current user if one isn't specified. Should have prompted you with something like "dt23@localhost's password:" Maybe try using "ssh root@localhost" instead. If that doesn't work it's some kind of problem with accounts. Again, I didn't have any problems using Mandy's default setup -- didn't edit any config files or anything -- so really can't be of much help, sorry.

Last edited by Crito; 03-05-2004 at 11:05 PM.
 
Old 03-05-2004, 11:12 PM   #8
dt23
Member
 
Registered: Mar 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Yep. Logged in as root. When I type 'ssh roo@locahost' I get prompted for the password and when I enter the root password I get "Permission denied, please try again", until I get the "Permission denied (publickey,password,keyboard-interactive)".

Thanks for trying. Maybe it's something with the ssh config that someone else might know about?

-dt23
 
Old 03-05-2004, 11:44 PM   #9
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
There's a PermitRootLogin option in sshd_config that's enabled by default if you installed from the 9.2 distribution disks but disabled by default if you downloaded the packages separately (or installed from source.) Might be worth checking that and/or trying to log in with a regular user account. If still nothing then it's got to be a problem with authentication/encryption. GL
 
Old 03-06-2004, 12:35 AM   #10
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Another program on windows you can try is ssh32. Putty didn't work for me on the network at work, ssh32 did work however. Putty would work if the computer was hooked up directly to a cable modem however.
 
Old 03-06-2004, 02:59 AM   #11
dt23
Member
 
Registered: Mar 2004
Posts: 30

Original Poster
Rep: Reputation: 15
I switched from root to another user login and this time I received the following message: "Warning: No xauth data; using fake authentication data for X11 forwarding".

It seems that I was able to login with ssh on my linux box when I used the other login, but is that warning message anything I need to worry about, you think?

-dt23
 
Old 03-06-2004, 09:30 AM   #12
Qzukk
Member
 
Registered: Jun 2003
Posts: 132

Rep: Reputation: 15
That warning just means that you either are not running X or you are not using xauth to protect your X server from random people displaying stuff on it.
 
Old 03-06-2004, 02:42 PM   #13
dt23
Member
 
Registered: Mar 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Cool. Now the only thing left for me is to connect from my Windows machine to the Mandrake machine.

When I try to use Putty I get a "Network Error: Connection refused".

I don't have firewall set up on the Mandrake yet.
I uncommented 'Port 22' in the sshd_config file, but that didn't work.
I know I can ping the Mandrake machine from the Windows one.

Is there anything else I need to mess with in the sshd_config to be able to connect? I didn't see anything about remote access anywhere in there.. and I know that sshd is running.

TIA,
dt23
 
Old 03-06-2004, 03:46 PM   #14
dt23
Member
 
Registered: Mar 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Correction, I no longer get the "Network Error: Connection Refused" error. I think that might have had to do with my dhcp settings getting tweaked when I lost connection overnight. (hate when that happens)

I basically still get the black prompt that appears after I try to login with Putty and then it goes away after a few seconds.
 
Old 03-06-2004, 05:28 PM   #15
dt23
Member
 
Registered: Mar 2004
Posts: 30

Original Poster
Rep: Reputation: 15
I switched the setting on Putty from 'Close window on clean exit' to 'Never'. Now it say 'Connection closed by remote host'. So it seems that ssh or my linux machine is not accepting remote connections...
 
  


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
SSH Configuration wildcat22 Linux - Networking 1 09-27-2005 08:47 AM
Slackware 10.1 + SSH Configuration Robert154 Linux - Networking 4 08-26-2005 10:01 PM
SSH Configuration xedios Linux - Software 2 10-25-2004 03:02 PM
ssh configuration questions vidarz Debian 2 06-08-2004 10:06 AM
SSH configuration...someone please help leroy27336 Linux - Networking 28 11-16-2003 01:27 AM


All times are GMT -5. The time now is 09:49 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration