LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-08-2005, 01:19 PM   #1
sploit
LQ Newbie
 
Registered: Dec 2004
Posts: 24

Rep: Reputation: 15
Trouble Configuring SSH Server


I am leaving for school soon but I can't live without all the files on my computer, so I decided to make it into a server. I have FTP working fine and I urpmi'd (I'm on Mandrake 2005) openssh-server.
I started up the server and moved to my laptop to test it out. When I try to connect from putty I get "Server unexpectedly closed network connection". I have never configured an SSH server before and everything I search for seems to only show client-side. Any help is appreciated.

Also, If anyone has time how can I use sftp?
 
Old 08-08-2005, 02:20 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
In order to use sftp, you need to get ssh working first.

First off, try sshing to localhost on your 'server'. If that works, sshd is working. Secondly, how is sshd configured? I would've thought it would work from the get go, but I'm not sure with mandrake.
 
Old 08-09-2005, 03:17 AM   #3
roopunix
Member
 
Registered: Feb 2004
Location: Kathmandu
Distribution: Redhat/fedora/Suse [Wanna Drive With Debian]
Posts: 208

Rep: Reputation: 30
on most cases you don't need to configure ssh server. If you need advanced configuration lile port listning banner etc. then you need to configure it.Other wise it will work on the default configuration as well.
ssh target-ipaddress
or
ssh target_hostname.
But be sure ssh server is running on the remote machine. To start the ssh server all you need to do is
# service sshd start.
next be sure the following packages are installed
openssh
openssh-clients
openssh-server
then check if there is no firewall blocking the ssh requests. SSH uses port 22 by default.
try to disable firewall rules first.
#iptables -F

try ssh on you local host
#ssh localhost
or
#ssh 127.0.0.1
 
Old 08-09-2005, 09:47 AM   #4
jojob
Member
 
Registered: Aug 2005
Location: Italy
Distribution: fedora
Posts: 32

Rep: Reputation: 15
Try to login as root user if your sshd configuration is the default configuration.
 
Old 08-09-2005, 01:08 PM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
Also, you'll eventually want to put "PermitRootLogin no" in your sshd_config file. But do that after testing things out.
 
Old 08-09-2005, 03:53 PM   #6
sploit
LQ Newbie
 
Registered: Dec 2004
Posts: 24

Original Poster
Rep: Reputation: 15
when I "ssh localhost" it will try to log me in as root, but I had already disabled that so it says no dice.
If I use "ssh -l sploit localhost" then I am able to login. So apparently ssh is working, but does anyone know how I can login as another user using putty or any ssh client for win (my laptop's graphics card won't work with nix).
 
Old 08-09-2005, 04:34 PM   #7
jojob
Member
 
Registered: Aug 2005
Location: Italy
Distribution: fedora
Posts: 32

Rep: Reputation: 15
Add this to your sshd_config (/etc/ssh/sshd_config on FC4) under the line "# override default of no subsystems"
AllowUsers sploit
 
Old 08-09-2005, 06:46 PM   #8
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
If he *IS* able to login locally, he doesn't need AllowUsers.

Is this machine behind any sort of NAT/firewall?
 
Old 08-09-2005, 11:32 PM   #9
charon79m
Member
 
Registered: Oct 2003
Distribution: Just about anything... so long as it is Debain based.
Posts: 297

Rep: Reputation: 30
In putty it will prompt you for a username.

You might try a port scanner from your XP box to see if port tcp 22 is open.

Also, once you get this working... check out XFreeCD. It is an X server for in Windows. Toss the CD in, run the install, ssh to your Linux box, and start your favorite apps. The X app will be piped across your ssh session to your Windows system. That's right, you can now have xeyes on your M$ box!!!

Not only will this give you the ability to forward X apps, it will also install a sftp app and scp app for in Windows. They seem to work pretty well too.

Hope this helps!

MrKnisely
 
  


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
Trouble configuring SSH publickey pioniere Linux - Security 4 02-25-2005 03:20 PM
Configuring SSH XaViaR Linux - General 4 01-13-2005 12:52 PM
do you need to configuring ssh????? cutejai Debian 1 11-30-2004 09:20 AM
configuring SSH dominant Linux - Security 2 04-01-2004 10:35 AM
Having trouble configuring SSH Travis86 Linux - Networking 3 06-19-2003 10:42 PM

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

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