SSH: connection refused
Forum » Forum / Network Access » SSH: connection refused
started by: karlokarlo
on: 1191795678|%e %b %Y, %H:%M %Z|agohover
number of posts: 25
rss icon RSS: new posts
summary:
After 20 days of working access, now big problem!
SSH: connection refused
karlokarlo 1191795678|%e %b %Y, %H:%M %Z|agohover

Please help me!

My ssh access, working fin in the past 30 days, now is corrupt!

In the last few days the ssh access was not really stable: I saw this warning message "Could not load host key: /etc/ssh_host_dsa_key".

I did an "chmod a+r /etc/ssh_host*": I read a post about this solution to resolve the warning.

I rebooted, and now no more access.

I've installed rtorrent (working fine), mt-daap (firefly), vsftpd.

I've tryed also to reapply the "firmware update" procedure, without success.

Any idea?

Thanks.

karlo

unfold SSH: connection refused by karlokarlo, 1191795678|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
ionoffionoff 1191803105|%e %b %Y, %H:%M %Z|agohover

Hey karlo,
try to update your firmware with
http://<IP-OF-YOUR-MYBOOK>/auth/firmware_upgrade.pl?fwserver=www.geekoh.com/mybook/ssh2

What this does it download a preconfigured SSHD config, keys, and permissions.

It then executes the sshd with this new config.

The ssh this runs is on port 29 instead of port 22 so you can try to get your original one working.
Just like the others, wait a little bit and then try on port 29.

All of the files and configs this makes are in /tmp/testSSH/

Let me know if this works for you


BTW, another url to create the normal sshd like the others is:
http://<IP-OF-YOUR-MYBOOK>/auth/firmware_upgrade.pl?fwserver=www.geekoh.com/mybook/ssh1

last edited on 1191803163|%e %b %Y, %H:%M %Z|agohover by ionoff + show more
unfold Re: SSH: connection refused by ionoffionoff, 1191803105|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
karlokarlo 1191913506|%e %b %Y, %H:%M %Z|agohover

It works!!!!! Great!!! I'm logged in again on my MyBook!

And now, to RESET the configuration on /etc?

It's enought to delete /etc/ssh_host_key* ?

Thanks again!

karlo

unfold Re: SSH: connection refused by karlokarlo, 1191913506|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
ionoffionoff 1191948781|%e %b %Y, %H:%M %Z|agohover

make sure your sshd_conf is 644 sudo chmod 644 /etc/sshd_conf
then do
sudo rm -f ssh_host_*
then do
sudo /usr/bin/ssh-keygen -t rsa1 -f /etc/ssh_host_key -C '' -N ''
sudo /usr/bin/ssh-keygen -t rsa -f /etc/ssh_host_rsa_key -C '' -N ''
sudo /usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key -C '' -N ''

then do
sudo chmod 600 ssh_host_*
sudo chmod 644 ssh_host_*.pub

then to test it is working
sudo /usr/sbin/sshd -f /etc/sshd_config
note any errors it may say and correct those (there should not be any unless your sshd_config is messed up) or if a sshd is running on port 22 already.
if there are no errors, (even if there are) try connecting to ssh on port 22 of it. (you can run both the ssh2's ssh on port 29 and regular ssh on port 22 at the same time until you figure it out.)
If your config is broken you can use the config from /tmp/testSSH/sshd_config, just edit it and change the port to 22 on the top. There are some other minor tweaks you may want to comment out such as the banner part.

unfold Re: SSH: connection refused by ionoffionoff, 1191948781|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
natsuconatsuco 1192744425|%e %b %Y, %H:%M %Z|agohover

Hi i make your command and i have an answere : /var/empty must be owned by root and not group or world-writable

What must i do to repare that ? thanks

unfold Re: SSH: connection refused by natsuconatsuco, 1192744425|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
ionoffionoff 1192745357|%e %b %Y, %H:%M %Z|agohover

really you should only have to do
chown -R root:root /var/empty

you may have to do chown -R root:root /var, but don't do that yet

unfold Re: SSH: connection refused by ionoffionoff, 1192745357|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
natsuconatsuco 1192815312|%e %b %Y, %H:%M %Z|agohover

I thx all for your help. I just make a chown -R root:root /var/empty and sudo /usr/sbin/sshd -f /etc/sshd_config and remove my old known_hosts file i just hope it will work a long time.

unfold Re: SSH: connection refused by natsuconatsuco, 1192815312|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
NoktirnalNoktirnal 1192132733|%e %b %Y, %H:%M %Z|agohover

ionoff,
I'm having same problem. When i try to ssh in, connection refused. using putty as terminal on windows machine. I have used all three url's I have found. yours and the original, but the browser never does anything. Just loads and then says done… blank page the whole time. The light on the drive flashes like it is doing something, i wait, try to ssh in on 22 and 29 but always get "connection refused" please help.

unfold Re: SSH: connection refused by NoktirnalNoktirnal, 1192132733|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
ionoffionoff 1192152462|%e %b %Y, %H:%M %Z|agohover

Noktirnal,
Have you ever had ssh working?
Can you access your files?
Can you access the web interface?

unfold Re: SSH: connection refused by ionoffionoff, 1192152462|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
NoktirnalNoktirnal 1192160378|%e %b %Y, %H:%M %Z|agohover

never had ssh working, web interface is working. no shares active, MioNet off,

unfold Re: SSH: connection refused by NoktirnalNoktirnal, 1192160378|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
ionoffionoff 1192163653|%e %b %Y, %H:%M %Z|agohover

What method did you turn off MoiNet?

What type of WB do you have?

What firmware version is it?

When you visit: http://<IP-OF-YOUR-MYBOOK>/auth/firmware_upgrade.pl?fwserver=www.geekoh.com/mybook/ssh1
does it say a firmware upgrade is avail?

Is your WB NAT, or static ip? Does it know the proper gateway and dns servers?

last edited on 1192167668|%e %b %Y, %H:%M %Z|agohover by ionoff + show more
unfold Re: SSH: connection refused by ionoffionoff, 1192163653|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
ionoffionoff 1192166661|%e %b %Y, %H:%M %Z|agohover

I have also added a telnet server installer.
Please visit Telnet

unfold Re: SSH: connection refused by ionoffionoff, 1192166661|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
NoktirnalNoktirnal 1192167612|%e %b %Y, %H:%M %Z|agohover

i turned it off through the web interface… when i turn on mionet or map drives, i have access to my files as well. I do not get the "new firmware available" mesage. My browser window just stays white, the blue status/loading bar fills quickly, then the status bar says done, but nothing ever shows up on the page.

unfold Re: SSH: connection refused by NoktirnalNoktirnal, 1192167612|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
ionoffionoff 1192168109|%e %b %Y, %H:%M %Z|agohover

Sorry to ask this, but you are replacing <ip-of-your-mybook> with your mybook's ip, right?

You need to make sure your internet options are setup properly for your mybook, gateway, subnet, dns servers.

But if you were having an internet connection problem you would receive something like:

Upgrade Firmware

There is no new firmware available

If it is able to access the server you would see something like:

New firmware available

New firmware available

[click to download and install]

    * The upgrade process takes approximately 30minutes depending on internet connection speed and general network activity.
    * THE USER SHOULD NOT ACCESS THE DEVICE UNTIL THE UPGRADE IS COMPLETE
    * The user must NOT power off the device during the upgrade process.
    * The user should NOTE, the front panel lights will
          o flicker during firmware download
          o extinguish for approximately 15 minutes, whilst applying the firmware
          o illuminate when firmware upgrade is complete

From how your describing, your not even getting the MyBook upgrade interface when you try to access it.
Does http://<ip-of-your-mybook>/auth/firmware_upgrade.pl show anything?
Try other web browsers (IE, Firefox/IceWeasel, Opera, Safari, Konqueror)

From the Main web interface, general setup tab, does Upgrade the System Firmware point to http://<ip-of-your-mybook>/auth/firmware_upgrade.pl

last edited on 1192168265|%e %b %Y, %H:%M %Z|agohover by ionoff + show more
unfold Re: SSH: connection refused by ionoffionoff, 1192168109|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
ArTiArTi 1192526696|%e %b %Y, %H:%M %Z|agohover

i have the same problems i can't login to SSH as root

another problems : the upgrade firmare page is a blank page to me…

i can acces to SSH but not as root and the sudo don't seems to work with the user i can login

someone can explain and details what does a firmware upgrade ?
perhaps i can try to upgrade the firmware manualy and that would reset my password no ?

also another question :
the web interface works ( i use a login and pass to login to it ) , is there a way to login to SSH with the user from the webpage ? ( i have try but don't work ) i have try also www-data but don't work too

or where i can know the list of the sudouser ?

perhaps it's possible to use one of the sudouser if i know who they are

any help is welcome

last edited on 1192526789|%e %b %Y, %H:%M %Z|agohover by ArTi + show more
unfold Re: SSH: connection refused by ArTiArTi, 1192526696|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
ArTiArTi 1192540960|%e %b %Y, %H:%M %Z|agohover

i have found myself what does the upgrade so if someone are interested i post here :

after logging on the box via ssh , have a look at
/var/log/messages
you see that message :

Sep 8 12:14:50 MyBookWorld local2.notice sudo: www-data : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/www/nbin//wget.sh /var/upgrade/fwv.tmp http://martin.hinner.info/mybook/fir...nc+fw=01.01.18

looking at wget.sh script , you see that within url script parameter(the 2nd), the '+' character will be changed to '&'

and after that, the script calls the above mentioned url.

that url provides a link to following url:
http://martin.hinner.info/mybook/files/latestfw.sh

You can see that messages in the log:

Sep 8 12:14:52 MyBookWorld user.notice /usr/www/lib/nasMaster.pl[772]: DAYWAN: <a href="http://martin.hinner.info/mybook/files/latestfw.sh">firmware</a>

Sep 8 12:14:54 MyBookWorld user.notice /usr/www/lib/nasMaster.pl[772]: DAYWAN: http://martin.hinner.info/mybook/files/latestfw.sh

Sep 8 12:15:18 MyBookWorld local2.notice sudo: www-data : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/www/nbin//getandapplyfw.sh http://martin.hinner.info/mybook/files/latestfw.sh

So , it seems that script latestfw.sh will be executed on the box.

That script executes the following commands:

- changes some access rigths ( chmod)
- generates 2 rsa keys used by ssh daemon
- reset root password to '' (null)
- starts ssh daemon

that script does not generates any dsa key, so before starting ssh daemon, you see following error message in the log:

Sep 8 12:22:34 MyBookWorld auth.err /usr/sbin/sshd[17035]: error: Could not load host key: /etc/ssh_host_dsa_key

Martin Hinner script should be improved by adding the following command

/usr/bin/ssh-keygen -q -t dsa -f $DSA_KEY -C '' -N ''

unfold Re: SSH: connection refused by ArTiArTi, 1192540960|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
laterringlaterring 1192564142|%e %b %Y, %H:%M %Z|agohover

@ArTi :

or where i can know the list of the sudouser ?

perhaps it's possible to use one of the sudouser if i know who they are

Sudoers are listed in /etc/sudoers

But now that you know how to ssh, just type su - and you'll be root !

unfold Re: SSH: connection refused by laterringlaterring, 1192564142|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
ionoffionoff 1192568227|%e %b %Y, %H:%M %Z|agohover

ArTi generating the dsa key takes longer to do… which is why I believe the original script does not include it.

unfold Re: SSH: connection refused by ionoffionoff, 1192568227|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
FreshmanFreshman 1194730693|%e %b %Y, %H:%M %Z|agohover

Hi,

how to make this SSH hack permanent?

unfold Re: SSH: connection refused by FreshmanFreshman, 1194730693|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
protteveelprotteveel 1219181614|%e %b %Y, %H:%M %Z|agohover

I used the URL for ssh2, but what user name and password should I use?

unfold Re: SSH: connection refused by protteveelprotteveel, 1219181614|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
NoktirnalNoktirnal 1192751652|%e %b %Y, %H:%M %Z|agohover

I have tried everything and can't get this to work. I tried all 4 sites and the firmware upgrade. I have tried it with windows and linux, every browser i could find. Sometimes i get "close shares…busy" message, sometimes i just get a blank page. In Linux with fevery browser except Konqueror, it just wanted to DL the file. I do notice the lights flashing, but only for 10-15 seconds, and then nothing. I try to login with ssh or telnet and get "connection refused" any ideas?
I did put in the IP of the MyBook, It is static. I have my router's IP and DNS servers from my ISP entered. And I have set its IP as DMZ on my router's firewall. I just don't know what else to try.

last edited on 1192751867|%e %b %Y, %H:%M %Z|agohover by Noktirnal + show more
unfold Re: SSH: connection refused by NoktirnalNoktirnal, 1192751652|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
OutrageouS90OutrageouS90 1198358492|%e %b %Y, %H:%M %Z|agohover

I have no sshd-config file in etc. I have the ssh_config one. Is this the problem?

unfold Re: SSH: connection refused by OutrageouS90OutrageouS90, 1198358492|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
BerzyBerzy 1201762613|%e %b %Y, %H:%M %Z|agohover

I have the same problem and desperately need help.
I have run the firmware upgrade it doesn't seem to transfer much data and it finishes the process after about 4min. then i have no access to ssh it seems.

unfold Re: SSH: connection refused by BerzyBerzy, 1201762613|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
rooflessdriverrooflessdriver 1206806347|%e %b %Y, %H:%M %Z|agohover

Hi all,

I am having the same problem with SSH connection refused messages.

I successfully upgraded the firmware using http://<IP-OF-YOUR-MYBOOK>/auth/firmware_upgrade.pl?fwserver=www.geekoh.com/mybook/ssh2

and saw the following

New firmware available

[click to download and install]

* The upgrade process takes approximately 30minutes depending on internet connection speed and general network activity.
* THE USER SHOULD NOT ACCESS THE DEVICE UNTIL THE UPGRADE IS COMPLETE
* The user must NOT power off the device during the upgrade process.
* The user should NOTE, the front panel lights will
o flicker during firmware download
o extinguish for approximately 15 minutes, whilst applying the firmware
o illuminate when firmware upgrade is complete

This appeared to finished ok, and my firmware is now showing as 01.01.18

I use Putty all the time for accessing my Unix servers at work, so I know it works ok on my home pc, but whenever i try to putty to MyBook on 192.168.0.4 using port 22 or port 29, i get the Network error:connection refused message.

I'm running windows xp, with a netgear dg834gt router which the mybook is plugged into the back of

I can get into the MyBook through the web interface, have set the network settings to manual configuration, so it has the above mentioned ip address
and if i go to http://<ip-of-your-mybook>/auth/firmware_upgrade.pl (using my ip address), i get

There is no new firmware available

I have also tried to telnet to it on port 23 and used Filezilla, to no avail.

I have tried adding ssh & telnet as allowed on the router firewall rules, (although these have worked in the past without entries), so I am stumped!

Would appreciate any help!

Thanks,
Sean.

unfold Re: SSH: connection refused by rooflessdriverrooflessdriver, 1206806347|%e %b %Y, %H:%M %Z|agohover
Re: SSH: connection refused
rooflessdriverrooflessdriver 1206826000|%e %b %Y, %H:%M %Z|agohover

Got it sussed now!

I had configured the network settings manually, with a static ip address and the dns settings for my ISP, and then noticed that it wasn't showing a default gateway and Mionet couldn't access the drive, showing it as offline.

I went back into network settings, put it back to automatic, rebooted pc & the MyBook and then logged back into the web interface. All looked ok, and Mionet could see the drive.

I used the telnet url http://<IP-OF-YOUR-MYBOOK>/auth/firmware_upgrade.pl?fwserver=www.geekoh.com/mybook/telnet and logged in with the new id I had created in the web interface successfully!

I added the two lines into /etc/inittab for telnet & ssh, rebooted but still no luck with ssh at the moment.
However, telnet is fine, so using that to move the files across to my new shares.

Boy is it slow!!

Sean.

unfold Re: SSH: connection refused by rooflessdriverrooflessdriver, 1206826000|%e %b %Y, %H:%M %Z|agohover
new post
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License