DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-02-09 12:57:07

esebag
Member
Registered: 2008-01-28
Posts: 60

SSH and Sancho settings...

Me again,

i read about security concerns in forwarding ports from the router to the DNS-323 for telnet, ftp or other access so i enabled the ssh server option and removed the telnet feature in the fun_plug. i also removed all forwarded ports in my router except for the ssh server.

i can now connect as 'root' and my password with Putty (SSH - port 22) from and outside home.

i wish to use Sancho outside home but i can't access the core. The ssh2 port forwarding tunnel option is enabled in Sancho. Is there something wrong with my settings in Sancho? (mldonkey is installed and working)

These are the steps i followed to enable ssh on my dns323:

sh dropbear.sh start
chmod a+x dropbear.sh
echo "root::0:0:99999:7:::" >>/etc/shadow
passwd root
/mnt/HD_a2/fun_plug.d/bin/store-passwd.sh
cd /mnt/HD_a2/fun_plug.d/start
chmod a-x telnetd.sh


Any help appreciated.

Offline

 

#2 2008-02-09 15:36:42

jules
Member
Registered: 2008-01-26
Posts: 78

Re: SSH and Sancho settings...

Hi, i'm using sancho 0.9.4-58 and all seems to work, the ssh connection is performed correctly and my sancho connects to 127.0.0.1:4001 to use the core through tunneling.
Here is my sancho's connection configuration, hope it helps.

Host settings:
    Host: 127.0.0.1
    Port: 4001
    User: admin
    Password: <yourpwd>

Use ssh2 port forward tunnel: obviously checked

    SSH host: <yourDNSip>
    SSH user: <AValidSSHUser...couldBeRootIfyouWant...>
    SSH password: <password>
    SSH port: 22
    SSH remote host: 127.0.0.1
    SSH remote port: 4001
    SSH local port: 4001

Last edited by jules (2008-02-09 15:38:52)


CH3SNAS - Black Box Ed. • FW:1.03b6a • 2 x WD5000AAKS

Offline

 

#3 2008-02-09 19:07:32

esebag
Member
Registered: 2008-01-28
Posts: 60

Re: SSH and Sancho settings...

Hi, it all works great! Thanks for your reply.

Here's another question for anyone out there who knows about moving torrent downloads after they have completed in mldonkey: the downloaded files cannot be dragged and dropped simply from one folder to another. using telnet is rather arduous and even after moving files through telnet, the files can't be renamed, erased etc...

i've looked into the mv_torrents.sh script but not sure if it is working properly. what can i try to fix this or is there another way to change read write permissions?

Thanks.

Offline

 

#4 2008-02-09 22:45:23

jules
Member
Registered: 2008-01-26
Posts: 78

Re: SSH and Sancho settings...

Usually i move the old files manually opening a telnet session, but maybe, when this operation is more frequent, creating a script that on demand or periodically moves the completed files is a better option (Personally, i don't like file_completed_cmd approach).
The mv_torrents.sh script provided by shadowandy seems a bit redundant, a stripped down version like this should also work:

Code:

#!/bin/sh

if [ -x "/mnt/HD_a2/torrents" ]; then
else
    mkdir -p /mnt/HD_a2/torrents
fi

if [ -d "/mnt/HD_a2/mldonkey/incoming/files" ]; then
    mv /mnt/HD_a2/mldonkey/incoming/files/* /mnt/HD_a2/torrents
fi
if [ -d "/mnt/HD_a2/mldonkey/incoming/directories" ]; then
    mv /mnt/HD_a2/mldonkey/incoming/directories/* /mnt/HD_a2/torrents
fi

chmod 666 /mnt/HD_a2/torrents/* -R

Those 666 and -R should solve your renaming/erasing/whatever issue wink

Last edited by jules (2008-02-09 22:48:38)


CH3SNAS - Black Box Ed. • FW:1.03b6a • 2 x WD5000AAKS

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB