ssh: port 22: connection refuused
Gary Kline
kline at thought.org
Fri May 7 05:14:05 UTC 2010
On Thu, May 06, 2010 at 04:41:21PM -0500, Tim Daneliuk wrote:
> On 5/6/2010 4:35 PM, Gary Kline wrote:
> > On Thu, May 06, 2010 at 12:32:18PM -0500, Tim Daneliuk wrote:
> >> On 5/6/2010 12:21 PM, Gary Kline wrote:
> >>>
> >>> can anybody help me with ne of my last problems: getting ssh Into
> >>> my new comuter? i am able to ssh outside. need to scp my config
> >>> files over.
> >>>
> >>> sshd is running on "zen"
> >>>
> >>>
> >>
> >> This generally involves two or three steps:
> >>
> >> 1) Make sure /etc/rc.conf has this in it:
> >>
> >> sshd_enable="YES"
> >
> > Yes; this was my first try. no diff.
> >>
> >> 2) Make sure /etc/hosts.allow permits access
> >> to your machine via ssh. Something like this:
> >>
> >> sshd: 192.168. a_host-name.com an.ip.add.ress :ALLOW
> >>
> >> Some people do this:
> >>
> >> sshd: ALL :ALLOW
> >>
> >> That's fine if the machine sits on a trusted LAN, but I don't
> >> much like this for machines that are internet-facing ... it
> >> just provides another vector for attack. So, for such machines,
> >> I explicitly name the address and names that are permitted ssh access.
> >
> > ok. itried this; have not rebooted yet. no difference right
> > now.
> >
> >>
> >> 3) If you're running a firewall, make sure that the sshd ports
> >> (22/tcp and 22/udp) are open for those machines/addresses
> >> you want to connect into your FreeBSD box.
> >>
> >
> >
> > i'm runnning a pfSense computer; pretty sure that things are
> > sett correctly there.
> >
> >>
> >> If you are still having trouble, go to the client machine
> >> and invoke your session like this:
> >>
> >> ssh -vvvvv your_freebsd_machine
> >>
> >
> > the files in /etc/ssh were the first thing i thought of
> > editing. didn't see many differences between rel 8.0 and my
> > current 7.3. still, here is the verbose output.
> >
> >
> > pl 14:20 <tao> [5036] ssh zen
> > ssh: connect to host zen port 22: Connection refused
> > pl 14:20 <tao> [5037] ssh -vvvv zen
> > OpenSSH_5.1p1 FreeBSD-20080901, OpenSSL 0.9.8e 23 Feb 2007
> > debug1: Reading configuration data /etc/ssh/ssh_config
> > debug2: ssh_connect: needpriv 0
> > debug1: Connecting to zen [10.47.0.190] port 22.
> > debug1: connect to address 10.47.0.190 port 22: Connection
> > refused
> > ssh: connect to host zen port 22: Connection refused
> > pl 14:22 <tao> [5038]
> >
> > any idea what the ``needpriv 0'' means?
> >
> >
> >
>
>
> What's in your /etc/hosts.allow file?
# Start by allowing everything (this prevents the rest of the file
# from working, so remove it when you need protection).
# The rules here work on a "First match wins" basis.
ALL : ALL : allow
that i moused and pasted from my main desktop.
>
>
> >> It will barf out a bunch of interesting information about why the connection
> >> isn't working that may help you figure out what's going on.
> >>
> >> Happy Trails,
> >>
> >> ----------------------------------------------------------------------------
> >> Tim Daneliuk tundra at tundraware.com
> >> PGP Key: http://www.tundraware.com/PGP/
> >>
> >> _______________________________________________
> >> freebsd-questions at freebsd.org mailing list
> >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> >
>
>
> --
> ----------------------------------------------------------------------------
> Tim Daneliuk tundra at tundraware.com
> PGP Key: http://www.tundraware.com/PGP/
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
--
Gary Kline kline at thought.org http://www.thought.org Public Service Unix
The 7.83a release of Jottings: http://jottings.thought.org/index.php
http://journey.thought.org 99 44/100% Guaranteed Novel
More information about the freebsd-questions
mailing list