LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-13-2009, 09:42 PM   #1
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Rep: Reputation: 30
Setting up SSH server


Well, after corrupting my Damn Small Linux, I am now installing a fresh copy of Debian.

My question is, what is the fastest way to get my box as a SSH server up and running?

I also think I need to do the following:

A) So far, I know that I need to have SSH installed, how do I do that with Debian?

B) Once I modify the sshd_psswd file, how or do I need to generate keys?

C) Am I missing anything?
 
Old 02-13-2009, 11:13 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by SuperDude123
A) So far, I know that I need to have SSH installed, how do I do that with Debian?
If I were interested in learning Debian, I think I'd bookmark, and read through, the following two resources:
But, I don't know Debian. That's just how I would approach it. I am sure you can figure out how to operate their package manager by reading those.

Quote:
Originally Posted by SuperDude123
B) Once I modify the sshd_psswd file, how or do I need to generate keys?
If you're referring to host identification keys, they're generated for you automatically the first time you launch sshd. If you're referring to rsa/dsa keys (i.e. for Pubkey Authentication), that requires a little more effort. Search the 'net for "ssh pubkey authentication". Setting these up are only necessary if you intend to authenticate that way.

Quote:
Originally Posted by SuperDude123
C) Am I missing anything?
We don't know. Get started on the right foot, and read that documentation. It will actually save you lots of time in the long run.
 
Old 02-13-2009, 11:17 PM   #3
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
Ok, I got the service installed, and I modified the sshd_config file, but the problem is, I can't ssh in. What could cause this?
 
Old 02-13-2009, 11:30 PM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,650

Rep: Reputation: 525Reputation: 525Reputation: 525Reputation: 525Reputation: 525Reputation: 525
Never heard of a sshd_psswd file.

8,997 different things. Is SSHD running?
 
Old 02-13-2009, 11:33 PM   #5
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
Opps, I meant the sshd_config file.

How do I start SSH? I keep trying to do /etc/init.d/ssh start as root, but all I get is

Starting OpenBSD Secure Shell server: sshdserver:/etc/init.d
 
Old 02-13-2009, 11:50 PM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,650

Rep: Reputation: 525Reputation: 525Reputation: 525Reputation: 525Reputation: 525Reputation: 525
What do
Code:
ps -ef | grep ssh
(as root)
Code:
netstat -anp | grep ssh
say
 
Old 02-14-2009, 12:00 AM   #7
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
I just noticed that when I load the system, I get the following prob:

Starting OpenBSD Secure Shell server: sshdCould not load host key: /etc/ssh/ssh_host_key
Disabling protocol version 1. Could not load host key


Concerning ps -ef | grep ssh, I get

root 1822 1 0 22:05 ? 00:00:00 /usr/sbin/sshd
root 1954 1949 0 22:09 tty1 00:00:00 grep shh

netstat -anp | grep ssh

tcp 0 0 0.0.0.0:8812 0.0.0.0:* Listen 1822/sshd

Now I see that we can see that I moved my port 22 to 8812
 
Old 02-14-2009, 12:23 AM   #8
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,650

Rep: Reputation: 525Reputation: 525Reputation: 525Reputation: 525Reputation: 525Reputation: 525
Disabling protocol 1 is good. 2 is better. What's the error when you try to SSH in?
 
Old 02-14-2009, 12:29 AM   #9
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
When I do "ssh root@192.168.0.196 -p 8812" on my mac, I get "ssh: connect to host 192.168.0.196 port 8812: Connection refused"

I did try running ssh -v start and the last line gave me a "ssh: start: Name or service not known"

Also, what should my rules in sshd_config look like if I plan to do user name and password log in? I did however manage to disable the protocol 1 stufff by placing a # in front.
 
Old 02-14-2009, 01:02 AM   #10
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
Well I solved my prob. I guess I was SSHing the wrong IP, so I was SSHing my mac, where the firewall was stoping me all the time. Thanks guys!
 
  


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
help for setting up X server to use ssh parv Fedora 7 02-25-2008 10:51 AM
setting up a ssh server esdeedee Linux - Security 1 10-06-2006 07:24 AM
Help setting up an X server and SSH on windows scrupul0us General 12 08-07-2006 03:13 PM
Setting up a SSH server Rob2105 Linux - Networking 8 03-17-2004 09:45 AM
Setting up an SSH server alany Linux - General 6 11-29-2002 07:49 PM


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