NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

riplatt's avatar
riplatt
Aspirant
Aug 03, 2012

[Solved] ssh stopped working (connection refused)

I installed the photo II add-on and now I can’t ssh into my readyNAS

Some details
ReadyNAS pro Firmware 4.2.21
Other add-on all still running
-Couchpotato
-Headphones
-Php5
-Python 2.7
-Sabnzbd
-Sickbeard

What i have tried (reboot have every step and nothing worked)
Reinstalling enableRootSSH
Installed toggleSSH
Tried to uninstall photo II but it just sits there with the spinning circle (overnight) also nevers goes into run.
Reinstalled OS
Reinstalled firmware via frontview update

Downloaded logs/config backup
- Boot_info show – ssh: 1331430496
- Services show – ssh=1

Nmap shows
 PORT      STATE SERVICE                  VERSION 
80/tcp open http Apache httpd
111/tcp open rpcbind (rpcbind V2) 2 (rpc #100000)
139/tcp open netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)
443/tcp open ssl/http Apache httpd
445/tcp open netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)
631/tcp open ipp CUPS 1.1
662/tcp open rquotad (rquotad V1-2) 1-2 (rpc #100011)
2049/tcp open nfs (nfs V2-4) 2-4 (rpc #100003)
2708/tcp open http CherryPy httpd 3.2.0
5050/tcp open mmcc?
8200/tcp open trivnet1?
8888/tcp open sun-answerbook?
32765/tcp open status (status V1) 1 (rpc #100024)
43993/tcp open mountd (mountd V1-3) 1-3 (rpc #100005)
50000/tcp open upnp MiniUPnP
55015/tcp open nlockmgr (nlockmgr V1-4) 1-4 (rpc #100021)
no ssh port open???

any one have any ideas on what to do next?

10 Replies

  • mdgm-ntgr's avatar
    mdgm-ntgr
    NETGEAR Employee Retired
    Try re-installing EnableRootSSH once more.

    Are you remembering to connect as the 'root' user?
  • Done again got the
    Successfully enabled root SSH access. The root password is now the same as your admin password.
    in the log

    but when accessing via putty on windows with the root user i still get "Network error: Connection refused"

    I have even truned off the firewall and directly connceted to the readyNAS can ping and get tot fronview.
  • Downloaded file, restored to NAS and rebooted still get "Network error: Connection refused"

    also nmap show's
    PORT   STATE  SERVICE

    22/tcp closed ssh

    i don't think the ssh services is running or is failing to start or crashing
  • thanks for the help.

    i will try support but last time i had something like this i had to do a factory reinstall delete all my data. my photos and doc's are backed up elsewhere but reripping my music, movies and other media takes weeks.
  • OK did a Factory reinstall frimware 4.2.21 - all ok started putting files back
    - installed enable root add-on
    - rebooted got ssh access
    - installed git via apt-get
    - install plex add-on
    - install python 2.7 add-on
    - install sabnzbd add-on

    rebooted all still ok -have ssh access
    - still moving files on 2nd day
    - setup couchpotato via git
    - setup sickbeard via git
    rebooted all still ok -have ssh access
    - still moving files 3rd day
    - have a play at building a couchpotato add-on
    - do a few build with the add-on sdk -no install yet

    - 4th day finshed moving files
    - reboot and no ssh access
    - yell and scream (other f'n 6 days moving files)
    - try install frimware 4.2.19
    - reboot got ssh access

    will try updateing frimware when i get home and see what bracks...
  • ok some more info
    - once logout out of ssh i then get the "connection refeused"
    - doing a frimware update from file gives me ssh again (any frimware 4.2.19 - 4.2.21)
    - logging out again breaks ssh (have to firmware reinstall)
    - with a ssh session open first time i get connection refused on any other session
    - googling and then looking at /var/log/auth.log with cat auth.log | grep ssh i get
     Aug 15 05:30:46 RIP-NAS sshd[2982]: Accepted password for root from 192.168.1.5 port 25553 ssh2
    Aug 15 05:30:46 RIP-NAS sshd[3649]: (pam_unix) session opened for user root by (uid=0)
    Aug 15 05:40:34 RIP-NAS sshd[5806]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
    Aug 15 05:40:34 RIP-NAS sshd[5806]: fatal: Missing privilege separation directory: /var/run/sshd
    Aug 15 05:44:24 RIP-NAS sshd[6316]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
    Aug 15 05:44:24 RIP-NAS sshd[6316]: WARNING: /etc/ssh/moduli does not exist, using fixed modulus

    - Googling and adding sshd to /var/run/ with mkdir sshd, chmod 0755 sshd
    - I can open a 2nd session and reopen 1st session but i get
     Aug 15 05:56:17 RIP-NAS sshd[2982]: syslogin_perform_logout: logout() returned an error
    Aug 15 05:56:24 RIP-NAS sshd[7877]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
    Aug 15 05:56:24 RIP-NAS sshd[7877]: WARNING: /etc/ssh/moduli does not exist, using fixed modulus
    Aug 15 05:56:32 RIP-NAS sshd[7877]: Accepted password for root from 192.168.1.5 port 25809 ssh2
    Aug 15 05:56:32 RIP-NAS sshd[7887]: (pam_unix) session opened for user root by (uid=0)
    in the auth.log

    do i need to do anything about "WARNING: /etc/ssh/moduli does not exist, using fixed modulus"??
    i'll leave it for now and see how my ssh access goes on frimware 4.2.21
  • that didn't survive a reboot
    - reinstalled firmware to get access back
    - sshd missing from /var/run/ again
    - 2nd session wont connect

    - mkdir /var/run/sshd
    - chmod 0755 /var/run/sshd
    - 2nd session will connect again

    - restart ssh with /etc/init.d/ssh restart
    - error: ssh Could not load host key: /etc/ssh/ssh_host_dsa_key

    - googled and found
    ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_rsa_key
    ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

    - tried and is now working after reboot
    - will give it a few days and see what happens. would like to know why these files go missing
  • ok been a few days and eveythings working think it's solved

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More