LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 11-09-2006, 05:33 PM   #1
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,667

Rep: Reputation: 112Reputation: 112
Sarge to Etch on ssh fails


Okay, I'm trying for a while, but nothing works...

I have a desktop and laptop and until recently both had Sarge installed. I could ssh from one to the other without any problem. Two weeks ago I decided to upgrade the laptop to Etch but that left me with some problems (like non-working menu entries) so I'd had to bite the bullet and re-install from scratch with an Etch net-install CD. All works well, except logging in remotely via ssh. I can ssh into the desktop from the laptop, but the other way round it fails with a 'Permission Denied' error. I've created a 1024 bit RSA key-pair and copied it from the laptop to the desktop (with scp, also works in only 1 direction), but to no avail. I'm doing something wrong, but I'm out of ideas...
 
Old 11-09-2006, 05:46 PM   #2
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697

Rep: Reputation: 61
Check out this link and check everything out step by step to see if all is configured. One thing to check is if there is a firewall active to make sure tcp port 22 is open.
http://www.suso.org/docs/shell/ssh.sdf

Brian
 
Old 11-09-2006, 05:51 PM   #3
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Just trying to find out more information.
Is this as a normal user?
Does your firewall allow port 22?
What do you see in your logs?
 
Old 11-09-2006, 07:04 PM   #4
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,667

Original Poster
Rep: Reputation: 112Reputation: 112
Brian, thanks for the link, I'll investigate.

Fordeck: this is indeed as a normal user, but that worked before as well. As root it also fails with the same error. Firewall? Not that I'm aware of. Port 22 should be open, as it's on my local LAN. However, I installed Guarddog as it appears iptables is present (and apparently active) on the laptop. It doesn't make a difference though....
 
Old 11-09-2006, 07:19 PM   #5
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
The user root by default should not be able to ssh. However iptables could be blocking port 22. Some distro's ask during instalation what services you want to allow, and if you did not explicitly allow port 22, then it will be blocked. One way to test would be to disable iptables on the laptop and try again.
 
Old 11-09-2006, 07:23 PM   #6
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,667

Original Poster
Rep: Reputation: 112Reputation: 112
I tried, even removed iptables all together, later disabled the firewall with Guarddog, but still that d*mned "Permission denied" error...
 
Old 11-09-2006, 07:41 PM   #7
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697

Rep: Reputation: 61
To clear iptables use the command as root ' iptables -F ' to flush the rules. See if you can connect as a regular user account. Only last thought to make sure port is open and there is to use a portscanning app from other local lan machine to scan that machine.

Brian
 
Old 11-09-2006, 07:57 PM   #8
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,667

Original Poster
Rep: Reputation: 112Reputation: 112
Thanks for the hint Brian, I scanned from the desktop and only ports 80, 111, 113, 538 and 5900 are reported open. (don't worry, I have a hardware firewall in my router ) I'll be looking back tomorrow to see if I overlooked something with that tutorial in hand. Thanks and good night! (it's 3 a.m. local time... zzzzzzzzzzzzzz )
 
Old 11-09-2006, 11:19 PM   #9
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
If the firewall is down and the port is not open ssh is either not installed or it's not running.. try to restart the daemon and see what happens..


Code:
debian:~# /etc/init.d/ssh stop
Stopping OpenBSD Secure Shell server: sshd.

debian:~# netstat -l | grep :ssh
debian:~#

debian:~# /etc/init.d/ssh restart
Restarting OpenBSD Secure Shell server: sshd.

debian:~# netstat -l | grep :ssh
tcp       0      0 *:ssh                   *:*                     LISTEN
Above I stopped ssh, then used netstat to check for the running daemon.. no response returned indicating ssh is not running.

I then restarted the ssh daemon used netstat to check for it and the response indicates ssh is indeed running on my machine now..
 
Old 11-10-2006, 06:00 AM   #10
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,667

Original Poster
Rep: Reputation: 112Reputation: 112
D*MN...
I tried the netstat command Farslayer gave and it turned out... Nothing! For some reason SSH wasn't installed, so I did a
Code:
apt-get install ssh
let it run for a few moments and then tried logging in from the desktop. Bingo!
Stupid, stupid, stupid banging head against wall

Okay, now I can proceed configuring my laptop Thanks guys!
 
Old 11-10-2006, 02:05 PM   #11
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Ah yes the 'BASE' install of Debian leaves out everything that isn't necessary.. including ssh

it does make for a clean system though ehh ?
 
Old 11-10-2006, 07:20 PM   #12
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,667

Original Poster
Rep: Reputation: 112Reputation: 112
A little too clean if you ask me
 
Old 11-11-2006, 08:13 AM   #13
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697

Rep: Reputation: 61
Glad to see you have it going. I guess you get what you ask for during and install. SSH should be a default all the way to Base install.

Brian
 
Old 11-11-2006, 08:44 AM   #14
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 3,975

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
Dutch Master,

Dist-upgrade doesn't work great in the stage of development Etch is in now, so I think it was justified to do a clean install. I have faced the same problems doing dist-upgrade. And a clean install of Etch is working just fine.

Indeed, Debian doesn't install SSH by default, and some more very basic packages it doesn't install.

Next time, do
Code:
dpkg --get-selections > my-installation.txt
on your old machine. You'll end up with a list of all your installed packages.

Edit the list if you like, but to get all packages back do:
Code:
dpkg --set-selections < my-installation.txt
This will install all packages again, but obviously the new versions. It works reasonably well since you are on a fresh installation. SSH is included for sure

jlinkels

PS. This is one of the reasons to get basic skills in vi. Even Debian doesn't leave out that one.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sarge or Etch? win2suse Debian 5 09-02-2006 11:27 AM
Sarge, Etch or Sid? Conjurer Debian 7 01-23-2006 09:24 PM
sarge or etch? anti.corp Debian 16 12-17-2005 05:57 AM
mobprobe fails on install of Sarge and Etch Rory in Toronto Debian 6 06-28-2005 02:13 PM
Upgrade from sarge to etch romrom Debian 5 06-07-2005 03:01 PM


All times are GMT -5. The time now is 02:02 PM.

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