DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th June 2008
cssgalactic cssgalactic is offline
Port Guard
 
Join Date: Jun 2008
Posts: 24
Thanked 0 Times in 0 Posts
Default How to set up ssh login

Hello. I have a DSL modem connected to the web all the time. I would like to connect remotetly. I had followed the documentation but so far every time the conection time out. What can I do?
Reply With Quote
  #2   (View Single Post)  
Old 25th June 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

Well, if you have an always-on connection and a system running 24/7... then, read the appropriate man pages and configuration files, ensure OpenSSH is running, (I advice you to disallow root logins..) and permit only SSHv2.

If you can confirm the daemon is running, you'll need a way to easily address your computer... if you have a domain delegated to you it's an easy task, afraid.org can get you a free one. (And clients exist to monitor changes to your IP address..).

Finally, if you bpf/ipfw configured... allow connections to tcp port 22.
Reply With Quote
  #3   (View Single Post)  
Old 25th June 2008
cssgalactic cssgalactic is offline
Port Guard
 
Join Date: Jun 2008
Posts: 24
Thanked 0 Times in 0 Posts
Default Thank you

But I have spent countles hours reading and setting up the config files. The connection is 24/7 the IP is always the same.

I have:

1. added sshd_enable="YES" to the rc.conf and

2. when I check the daemon seems to be working

3. I have configured the ssh_config. To listen to the IP address, not to accept root login, to allow one specific user, etc....

Using my laptop I can login using ssh (inside my home network) But when I'm outside (office) I can't login using ssh. It times out. Can you give a list of all the files I should be configuring and maybe some samples. Maybe I'm missing a step. I promise you I have been doing my homework before I come to the forum to ask for help.
Reply With Quote
  #4   (View Single Post)  
Old 25th June 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Thanked 20 Times in 18 Posts
Default

Quote:
Originally Posted by cssgalactic View Post
but so far every time the conection time out
Sounds like you havent done port forwarding on the router
Reply With Quote
  #5   (View Single Post)  
Old 25th June 2008
cssgalactic cssgalactic is offline
Port Guard
 
Join Date: Jun 2008
Posts: 24
Thanked 0 Times in 0 Posts
Default Port forwarding

On the actual DSL router control panel?
Reply With Quote
  #6   (View Single Post)  
Old 25th June 2008
adamk adamk is offline
Spam Deminer
 
Join Date: May 2008
Posts: 250
Thanked 5 Times in 8 Posts
Default

Yes, you need to configure the router to forward port 22 to your freebsd machine.

Adam
Reply With Quote
  #7   (View Single Post)  
Old 25th June 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

the sshd server should listen on the local network (as necessary) on the designated port.

the router needs to forward incoming connections on the designated port to your external ip/domain to that machine.


Other wise generally, the router will tell anyone outside your home network to go to hell when trying to ssh in ;-)
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #8   (View Single Post)  
Old 25th June 2008
Seb74 Seb74 is offline
Port Guard
 
Join Date: Jun 2008
Posts: 20
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by TerryP View Post
the sshd server should listen on the local network (as necessary) on the designated port.

the router needs to forward incoming connections on the designated port to your external ip/domain to that machine.


Other wise generally, the router will tell anyone outside your home network to go to hell when trying to ssh in ;-)
Even if it doesn't (maybe it hasn't got any specific firewall and just runs PAT) it doesn't know which pc in the LAN to forward the traffic to.
Maybe you got 3-4 pc's there, how should the router know which one that incoming ssh-request is meant for.
So, as others have said, of course you need to forward that port on the router to the specific machine/port.
Reply With Quote
  #9   (View Single Post)  
Old 25th June 2008
cajunman4life cajunman4life is offline
Real Name: Aaron Graves
Package Pilot
 
Join Date: May 2008
Location: Coolidge, Arizona
Posts: 203
Thanked 16 Times in 14 Posts
Default

It could be your router; It could be your work disallows connections on certain ports. For sure check your router config.
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident!
Reply With Quote
Old 26th June 2008
tad1214 tad1214 is offline
Real Name: Thomas Donnelly
Fdisk Soldier
 
Join Date: Jun 2008
Location: Houston, TX
Posts: 60
Thanked 0 Times in 0 Posts
Default

Once you get it working, it may be wise to change your port number. While security through obscurirty isn't security at all, it sure does seem to stop the bots from hammering away.
Reply With Quote
Old 26th June 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

Quote:
Originally Posted by Seb74 View Post
Even if it doesn't (maybe it hasn't got any specific firewall and just runs PAT) it doesn't know which pc in the LAN to forward the traffic to.
Maybe you got 3-4 pc's there, how should the router know which one that incoming ssh-request is meant for.
So, as others have said, of course you need to forward that port on the router to the specific machine/port.

I thought that such issues would be considered implicitly with my previous post.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Old 28th June 2008
cssgalactic cssgalactic is offline
Port Guard
 
Join Date: Jun 2008
Posts: 24
Thanked 0 Times in 0 Posts
Talking

I now have established all the services I need ssh, ftp and http. Thank you very much. I'm feeling the love my FreeBSD Box.
Reply With Quote
Old 28th June 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Thanked 20 Times in 18 Posts
Default

Quote:
Originally Posted by cssgalactic View Post
I now have established all the services I need ssh, ftp and http. Thank you very much. I'm feeling the love my FreeBSD Box.
Being able to ssh LAN from internet is great, isnt it? Do you feel like home now?
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to start X11 on login? Mantazz FreeBSD Ports and Packages 2 10th July 2009 07:27 PM
cannot login after installation ccc FreeBSD Installation and Upgrading 3 28th October 2008 11:54 AM
Login automatically map7 FreeBSD General 1 12th October 2008 11:09 PM
How can i login to my FreeBSD ?? ceramic FreeBSD Installation and Upgrading 4 28th July 2008 11:56 AM
DSL auto login Weaseal FreeBSD General 3 17th June 2008 03:26 PM


All times are GMT. The time now is 10:08 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick