LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 02-15-2008, 11:40 PM   #1
Verlager
LQ Newbie
 
Registered: Jan 2008
Distribution: Zenwalk, Mint, Slackware
Posts: 9

Rep: Reputation: 0
ssh connection refused


I change my computers a lot, reinstalling and trying new distros. I keep an Intel P4 box in the basement with the left cover panel off, with 4x 80 GB IDE HDs exposed. I simply switch the IDE cable to a different HD to experiment with another distro. The router keeps the same 192.169.1.106 number for the comp, regardless of which HD is used. But, the ssh function is always lost after I switch distros:

Code:
rmack@recruit:~$ ssh 192.168.1.106
ssh: connect to host 192.168.1.106 port 22: Connection refused
I think one of these files has to be refreshed or edited because I switched linux distros within the same box, and I guess new keys were generated. What do I do to initialize ssh, without removing ssh and .ssh and reinstalling ssh?

Code:
rmack@recruit:~$ ls .ssh
authorized_keys  id_dsa  id_dsa.pub  identity  identity.pub  known_hosts
 
Old 02-16-2008, 01:48 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
looks uch more like you simply haven't got sshd running in the first place. your error message is symptomatic of a tcp level issue. which is well well before anything application specific is relevant.
 
Old 02-16-2008, 02:13 AM   #3
Verlager
LQ Newbie
 
Registered: Jan 2008
Distribution: Zenwalk, Mint, Slackware
Posts: 9

Original Poster
Rep: Reputation: 0
I beg to differ! ssh is installed.

Quote:
Originally Posted by acid_kewpie View Post
looks uch more like you simply haven't got sshd running in the first place. your error message is symptomatic of a tcp level issue. which is well well before anything application specific is relevant.
Gosh, how can that be? The command returns an ssh error message. "man ssh" returns the help file. it sure *seems* that ssh is installed. I have an .ssh directory with configuration files that wouldn't exist if I didn't have ssh installed.
 
Old 02-16-2008, 02:27 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The ssh daemon needs to be running to accept connections. The main cause however is that when you install a different distro, your public and private keys will be changed and won't match a remote computers known_hosts entry for your computer. If you delete the old entry you probably will be able to reconnect.

I'm referring to the known_hosts on the windows machine or other machine from which you are trying to make the ssh connection. Putty's or cygwin's ssh client will either have a known_hosts file or an equivalent.

Last edited by jschiwal; 02-16-2008 at 06:07 PM. Reason: fixed up a couple of phrases.
 
Old 02-16-2008, 01:07 PM   #5
bpence
LQ Newbie
 
Registered: Feb 2008
Posts: 6

Rep: Reputation: 0
The .ssh directory and response for 'man ssh' means only that the client side is installed. The server side config is usually in /etc/ssh. Look for a file called sshd_config. And, of course, read the man pages:

man sshd

man sshd_config

Also, check to see if it is running. Just because it is installed doesn't mean it is running. Check the running processes for the sshd daemon:

ps -deaf | grep sshd

Brian Pence

Last edited by acid_kewpie; 02-26-2008 at 01:22 PM.
 
Old 02-18-2008, 11:10 PM   #6
Verlager
LQ Newbie
 
Registered: Jan 2008
Distribution: Zenwalk, Mint, Slackware
Posts: 9

Original Poster
Rep: Reputation: 0
You were right!

You were right. I solved it by going to Synaptic and installing openssh-server, which immediately solved everything. Thank you so much!
 
Old 02-26-2008, 11:39 AM   #7
nlb6665
LQ Newbie
 
Registered: Nov 2003
Posts: 1

Rep: Reputation: 0
SSH - connection refused

Thank you!

This was my problem as well. Being a linux noob, I installed a new copy of the the latest debian net install (below), but couldn't get ssh to connect from inside or outside the machine. Guessing, I thought it was some kind of port binding or firewall blocking me when it was simply not having openssh-server installed.

"apt-get install openssh-server" did the trick.

Linux carbuncle 2.6.18-6-486 #1 Sun Feb 10 22:06:33 UTC 2008 i686
 
Old 02-26-2008, 05:54 PM   #8
Verlager
LQ Newbie
 
Registered: Jan 2008
Distribution: Zenwalk, Mint, Slackware
Posts: 9

Original Poster
Rep: Reputation: 0
Amazing. We lucked out.
 
  


Reply

Tags
connection, debian, refused, ssh



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 Connection Refused? lowpro2k3 Linux - Networking 2 11-04-2009 11:02 AM
ssh connection refused - trying to set up ssh server at home openSauce Linux - Server 10 10-18-2007 04:38 PM
SSH connection refused theoneandonly19 Red Hat 1 07-01-2007 02:48 AM
SSH Connection Refused meping Linux - Networking 9 04-15-2006 01:04 AM
ssh connection refused rguptatx Red Hat 4 11-13-2003 06:18 PM

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

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