LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 08: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, 10:13 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
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, 10: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, 10:30 PM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

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

8,997 different things. Is SSHD running?
 
Old 02-13-2009, 10: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, 10:50 PM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
What do
Code:
ps -ef | grep ssh
(as root)
Code:
netstat -anp | grep ssh
say
 
Old 02-13-2009, 11:00 PM   #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-13-2009, 11:23 PM   #8
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Disabling protocol 1 is good. 2 is better. What's the error when you try to SSH in?
 
Old 02-13-2009, 11:29 PM   #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, 12: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



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 9 07-22-2015 06:50 AM
setting up a ssh server esdeedee Linux - Security 1 10-06-2006 06:24 AM
Help setting up an X server and SSH on windows scrupul0us General 12 08-07-2006 02:13 PM
Setting up a SSH server Rob2105 Linux - Networking 8 03-17-2004 08:45 AM
Setting up an SSH server alany Linux - General 6 11-29-2002 06:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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