WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: openssh connection refused  (Read 5802 times)

Offline mc006

  • Newbie
  • *
  • Posts: 8
openssh connection refused
« on: July 28, 2010, 06:12:24 PM »
Hi,
I have installed openssh, i.e. client and server. when i try to test and execute ssh localhost, i get error saying connection refused. How do i check if ssh server is running and listening on port 22. where is the config file.
when i do df -h i can see entry /dev/loop43 /tmp/tcloop/openssh

Thanks


Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: openssh connection refused
« Reply #1 on: July 28, 2010, 07:42:41 PM »
A fair indication of whether SSH is running:
Code: [Select]
ps aux | grep sshdIs something running on port 22?
Code: [Select]
netstat -at | grep -e "22\|ssh"Netstat can also be coerced to show what application is using what port, but I'll leave that as an excercise to the reader (hint: Google) (It may also require the full netstat, rather than the busybox version)

Config files for applications will more often than not be in /usr/local/etc, so for SSH I'd check /usr/local/etc/ssh

The init script (if the application has one) will similarly usually appear in /usr/local/etc/init.d

TC doesn't (usually) start applications by default, that's what the /home/tc/.X.d folder and /opt/bootlocal.sh are for. (.X.d for desktop applications (conky, pigin, etc) and bootlocal.sh for services (ssh, apache, etc))

Offline ophiry

  • Newbie
  • *
  • Posts: 13
    • LinkedIn Profile
Re: openssh connection refused
« Reply #2 on: July 29, 2010, 01:09:21 AM »
Indeed, sshd doesn't start automatically when installed.
I believe there's a boot code that will start the daemon automatically, or you can add it to bootlocal.sh.

before starting the daemon, you may need a few other steps:
1. create keys for the daemon
2. by default sshd doesn't allow users with no password (such as tc) or the root user to login.
you'll need to either override these limitations in the configuration files, or add\modify the users.

Ophir

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: openssh connection refused
« Reply #3 on: July 29, 2010, 02:24:29 AM »
I believe there's a boot code that will start the daemon automatically [...]
That was removed (a while ago)

Offline mc006

  • Newbie
  • *
  • Posts: 8
Re: openssh connection refused
« Reply #4 on: July 29, 2010, 04:04:47 AM »
Hi,
thanks i got it working now....
by default when try to start openssh using ./openssh start, it looks for sshd_config file which you can create by cp the sshd_config.example file. The issue is that when it does not find the sshd_config file it displays the error output stating that there is no sshdd_config file.....this is where the error is it should state sshd_config and not sshdd_config....minor error...

Thanks

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: openssh connection refused
« Reply #5 on: July 29, 2010, 11:18:29 AM »
Netstat can also be coerced to show what application is using what port, but I'll leave that as an excercise to the reader (hint: Google) (It may also require the full netstat, rather than the busybox version)
Works fine with busybox  ;)
Option is "-p"
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)