LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2007, 02:57 PM   #1
rushinblue
LQ Newbie
 
Registered: Oct 2007
Posts: 10

Rep: Reputation: 0
Smile Can't SSH/Putty into Debian server


Hi all, I just switched from FC6 to Debian and I can no longer putty (ssh) in to the server.

I get the following error message when I attempt to open it.

[PuTTY Fatal Error]-Title
Network error: Connection refused

Is there a firewall restriction within debian that by default blocks this connection?

Note: I am trying to SSH to the debian box from the same lan/subnet.

Thanks
 
Old 10-31-2007, 03:07 PM   #2
blane
LQ Newbie
 
Registered: May 2007
Location: Virginia
Distribution: slackware, solaris
Posts: 4

Rep: Reputation: 0
Is sshd running on the debian machine?
 
Old 10-31-2007, 03:11 PM   #3
rushinblue
LQ Newbie
 
Registered: Oct 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Still pretty new to Linux, how do I check that?
 
Old 10-31-2007, 03:17 PM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Is it even installed ? By default Debian does NOT install the ssh server if you start with just a base install of the OS.

Code:
username@it-etch:~$ apt-cache policy openssh-server
openssh-server:
  Installed: 1:4.3p2-9
  Candidate: 1:4.3p2-9
  Version table:
 *** 1:4.3p2-9 0
        500 http://ftp.uwsg.indiana.edu etch/main Packages
        100 /var/lib/dpkg/status
to see if it's running

Code:
it-etch:~# netstat -nlp | grep ::22
tcp6       0      0 :::22                   :::*                    LISTEN     29489/sshd
it-etch:~#
This is actually one of the reasons I like Debian, it doesn't assume I want all sorts of services running by default. I have to Specifically install and configure what I want to run.

Last edited by farslayer; 10-31-2007 at 03:19 PM.
 
Old 10-31-2007, 03:18 PM   #5
rushinblue
LQ Newbie
 
Registered: Oct 2007
Posts: 10

Original Poster
Rep: Reputation: 0
probably not. i did a basic install b/c some of the other components kept failing (web, desktop, etc)
 
Old 10-31-2007, 03:21 PM   #6
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
aptitude update
aptitude keep-all
aptitude install openssh-server


you should be good to go !!
 
Old 10-31-2007, 03:24 PM   #7
rushinblue
LQ Newbie
 
Registered: Oct 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks, that was it!!! It wasn't installed.
----
How do you know what the package name is?

For instance, if I would have thought it wasn't installed. I would have entered 'apt-get install ssh' or 'apt-get install sshd'

Thanks
 
Old 10-31-2007, 03:25 PM   #8
Winter Knight
Member
 
Registered: Nov 2005
Distribution: Debian Stable/Testing
Posts: 54

Rep: Reputation: 15
Quote:
Originally Posted by rushinblue View Post
Is there a firewall restriction within debian that by default blocks this connection?
No. If you want a firewall, you can install and configure iptables, but it is not usually necessary.

To install and run the openssh-server, run the following as root:
aptitude install openssh-server

It will set up to start automatically at boot.
 
Old 10-31-2007, 03:31 PM   #9
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Well since Debian etch they recommend you use Aptitude instead of apt-get and don't switch back and forth.. (just fyi)

to locate the package a quick search will find the name for you ..

aptitude search ssh - Searches package names
or
aptitude search -d ssh - Searches package descriptions


Code:
it-etch:~# aptitude search ssh
p   aolserver4-nssha1                            - AOLserver4 module: performs SHA1 hashes
p   autossh                                      - Automatically restart SSH sessions and tunnels
p   clusterssh                                   - administer multiple ssh or rsh shells simultaneously
p   crosshurd                                    - Install a Debian system
p   dpsyco-ssh                                   - Automate administration of access via ssh
p   kdessh                                       - ssh frontend for KDE
p   libnet-ssh-perl                              - Perl extension for secure shell
v   libnet-ssh-ruby                              -
p   libnet-ssh-ruby1.8                           - pure ruby module that emulates an SSH client
p   libpam-ssh                                   - enable SSO behavior for ssh and pam
i   openssh-client                               - Secure shell client, an rlogin/rsh/rcp replacement
i A openssh-server                               - Secure shell server, an rshd replacement
i = installed
v = virtual package
p = No trace of the package is on your system
c = The package was deleted but the config files remain on the system.



Debian Aptitude how-to

Last edited by farslayer; 10-31-2007 at 03:34 PM.
 
Old 10-31-2007, 03:34 PM   #10
rushinblue
LQ Newbie
 
Registered: Oct 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Cool, OK, so I need to start using aptitude from now on.

Thanks again everyone for your help!!!
 
  


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
Freshly installed Debian 4.0 only accepting ssh connection from PuTTY. Zombie13 Debian 12 07-23-2007 02:16 PM
putty ssh login in Linux server alexz Linux - General 5 06-08-2007 12:22 PM
Ubuntu 6.06 Server(SSH Setup/Putty) TechMansoor Linux - Networking 1 12-16-2006 09:05 PM
SSH to Redhat server via Internet using Putty pbowrin Linux - Enterprise 4 11-24-2006 09:46 AM
Activating VNC-server from putty (ssh) bulls_i Linux - Networking 4 10-21-2005 07:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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