Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After reading many pages of documentation and articles on how to telnet or SSH into FreeBSD as root, none have given me a solution that actually works. I am looking for a how-to-remote-into this FreeBSD in less than 10 easy steps.

Current state

  • I am running Windows7 on host machine, subnet
  • can ping the FreeBSD 8.1 host (running on WMWare) at
  • edited /etc/inetd.conf, /etc/rc.conf. sshd_enable="YES"
  • any attempt to telnet via PutTy to return "connection refused"
  • /etc/rc.d/sshd status returns sshd is not runnin0. what needs to be done to run it?

At the moment I'll take whichever method is easier secure or not. No RTFM answers please.

share|improve this question
up vote 4 down vote accepted
  1. Undo whatever you did to inetd.conf.
  2. Edit /etc/ssh/sshd_config, add PermitRootLogin yes
  3. run /etc/rc.d/sshd start

Telnet doesn't work on ssh. You have to connect via ssh in PuTTY.

If you have a firewall up, you'll need to punch a hole.

Security Note: #2 is a really terrible idea. You should either:

  • add your user to the wheel group so they can su to root (pw groupmod -n wheel -m your-user)
  • install sudo (easiest is pkg_add -r sudo).
share|improve this answer
I checked and should have added that PermitRootLogin yes of /etc/ssh/sshd_config was already yes. Other maybe relevant and existing settings are #PermitUserEnvironment no, #UsePAM yes, #PermitTunnel no. # means commented out. – T. Webster Apr 12 '13 at 3:22
Also to undo inetd.conf leaves both ssh and telnet lines commented with # --is that what we want? #login remains unchanged and disabled although it looks like it would be something to enable. – T. Webster Apr 12 '13 at 3:24
Alright after going back to VMWare snapshot before changing inetd.conf, with everything commented out (satisfying 1), yes (2), and /etc/rc.conf sshd_enabale="YES", and then (3), I have sshd now running. – T. Webster Apr 12 '13 at 3:28
Didn't explicitly set any firewall configurations besides enabling Windows firewall. At last I have connected via PuTTY. Have not yet implemented security note, but this will work for now in this lab environment. – T. Webster Apr 12 '13 at 3:34
inetd is an old server server; it's useful for somethings like tftp and the ancient time protocols (not NTP), but definitely not ssh. Telnet is a terrible idea all around, it's best to just leave that rotting corpse in the ground if you have any option. Glad to head you've got sshd running. If you do implement a firewall, use pf or ipfw (preferably the former if you're unfamiliar with either). – Chris S Apr 12 '13 at 3:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.