LG MS400H - LG HR920D - Vu+
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Le Deal du moment :
Funko POP! Jumbo One Piece Kaido Dragon Form : ...
Voir le deal

SSH / RSYNC

5 participants

Aller en bas

SSH / RSYNC Empty SSH / RSYNC

Message  llg Dim 2 Jan 2011 - 12:25

Bonjour,

quelqu'un a-t-il déjà porté un serveur SSH : je pensais notamment à Dropbear ?

Merci

llg

Messages : 11
Date d'inscription : 02/01/2011
Localisation : Paris

Revenir en haut Aller en bas

SSH / RSYNC Empty Re: SSH / RSYNC

Message  Seb@stien Dim 2 Jan 2011 - 23:10

Le binaire multi pour MIPS : http://moviecube.free.fr/Binaries/sftp%20server/dropbearmulti
Edit : et le sftp server : http://moviecube.free.fr/Binaries/sftp%20server/sftp-server

Par contre me souviens plus si j'ai testé et si ça fonctionnait

Wink

Seb@stien

Seb@stien
Admin
Admin

Messages : 569
Date d'inscription : 02/12/2009
Age : 46
Localisation : 95

Revenir en haut Aller en bas

SSH / RSYNC Empty RE : RE : SSH / RSYNC

Message  llg Lun 3 Jan 2011 - 9:40

Ok, merci pour le lien : je teste ça et te tiens ou courant. Pour l'instant, je rsync en remote via des montages CIFS Very Happy

llg

Messages : 11
Date d'inscription : 02/01/2011
Localisation : Paris

Revenir en haut Aller en bas

SSH / RSYNC Empty RE : RE : SSH / RSYNC

Message  llg Mar 4 Jan 2011 - 9:46

Bon, le binaire n'est pas compatible Sad

Code:
./dropbear: can't resolve symbol '__uClibc_start_main'

J'ai installé buildroot-2010.11, ajouté dropbear et ça marche
Very Happy
Penser à installer qt3-devel et libXi-devel sur la machine de compile

Sur le lg :installer :

Code:
/tmp/hdd/root/.ssh # ll
-rwxrwxr-x    1 root    root      280728 Jan  4 14:10 dropbear
-rw-------    1 root    root          426 Jan  4 15:37 dropbear_rsa_host_key
lrwxrwxrwx    1 root    root            8 Jan  4 15:36 dropbearkey -> dropbear
-rwxrwxr-x    1 root    root      214380 Jan  4 13:50 libgcc_s.so.1
lrwxrwxrwx    1 root    root          13 Jan  4 15:26 libz.so -> libz.so.1.2.5
lrwxrwxrwx    1 root    root          13 Jan  4 15:26 libz.so.1 -> libz.so.1.2.5
-rwxrwxr-x    1 root    root        83520 Jan  4 14:10 libz.so.1.2.5

Setter LD_LIBRARY_PATH puis générer la clef (RSA ou DSS) : ./dropbearkey -t rsa -f ./dropbear_rsa_host_key
Lancer le démon : ./dropbear -r dropbear_rsa_host_key -F -E
Créer un user en dupliquant root (penser à changer l'id et le home) : en effet, la commande passwd plante
Se connecter et enjoy

llg

Messages : 11
Date d'inscription : 02/01/2011
Localisation : Paris

Revenir en haut Aller en bas

SSH / RSYNC Empty RE : RE : SSH / RSYNC

Message  llg Mar 4 Jan 2011 - 17:50

Question : si je colle les binaires et libs dans /usr/sbin et /lib et que je modifie inetd.conf, c'est flingué à chaque update de firmware ?

Merci

llg

Messages : 11
Date d'inscription : 02/01/2011
Localisation : Paris

Revenir en haut Aller en bas

SSH / RSYNC Empty Re: SSH / RSYNC

Message  Seb@stien Mar 4 Jan 2011 - 23:14

Cool Wink

Oui, il me semble qu'à chaque Update c'est flingué
/lib et /usr/sbin sont en R/W ?

Seb@stien

Seb@stien
Admin
Admin

Messages : 569
Date d'inscription : 02/12/2009
Age : 46
Localisation : 95

Revenir en haut Aller en bas

SSH / RSYNC Empty Re: SSH / RSYNC

Message  james56 Mar 4 Jan 2011 - 23:33

Bonjour,

Juste pour infos, c'est quoi l'intérêt d'avoir un serveur SSH sur le MS400 ? (par rapport à putty, FTP ou Samba ?)

James

james56

Messages : 30
Date d'inscription : 15/01/2010
Age : 61
Localisation : Bretagne

Revenir en haut Aller en bas

SSH / RSYNC Empty Re: SSH / RSYNC

Message  ftnonen Mer 5 Jan 2011 - 0:04

james56 a écrit:Bonjour,

Juste pour infos, c'est quoi l'intérêt d'avoir un serveur SSH sur le MS400 ? (par rapport à putty, FTP ou Samba ?)

James


J'ai trouvé ça qui semble donner une réponse.
http://fr.wikipedia.org/wiki/Rsync
Cdlt

ftnonen

Messages : 65
Date d'inscription : 08/02/2010

Revenir en haut Aller en bas

SSH / RSYNC Empty RE : SSH / RSYNC

Message  llg Mer 5 Jan 2011 - 7:33

james56 a écrit:Bonjour,

Juste pour infos, c'est quoi l'intérêt d'avoir un serveur SSH sur le MS400 ? (par rapport à putty, FTP ou Samba ?)

James

Bonjour,
plusieurs avantages :
- en configurant correctement ton client, avec SSH, tu peux accéder au LG directement via des rebonds automatiques depuis n'importe où.
- rsync te permet de synchroniser (dans les 2 sens) ton lg et un disque de backup par exemple, de façon automatisée dans une crontab.
- Samba (CIFS) est lent et a été conçu pour l'interopérabilité avec le monde Windows (qui est banni chez moi Very Happy ) : on peut faire des montages sur du SSH via FUSE.

Cdlt

llg

Messages : 11
Date d'inscription : 02/01/2011
Localisation : Paris

Revenir en haut Aller en bas

SSH / RSYNC Empty RE : RE : SSH / RSYNC

Message  llg Mer 5 Jan 2011 - 7:57

Seb@stien a écrit:Cool Wink

Oui, il me semble qu'à chaque Update c'est flingué
/lib et /usr/sbin sont en R/W ?

Seb@stien
Read-only file system Sad

llg

Messages : 11
Date d'inscription : 02/01/2011
Localisation : Paris

Revenir en haut Aller en bas

SSH / RSYNC Empty Re: SSH / RSYNC

Message  james56 Mer 5 Jan 2011 - 9:01

Bonjour,

Cela me parait très intéressant.
Je n'ai pas les connaissance suffisante pour l'installer tout seul, aurais-tu le temps de faire un tutos d'install pour Dropbear ?

James

james56

Messages : 30
Date d'inscription : 15/01/2010
Age : 61
Localisation : Bretagne

Revenir en haut Aller en bas

SSH / RSYNC Empty Re: SSH / RSYNC

Message  Keltek Mer 5 Jan 2011 - 10:00

Hi all, especially llg,
I can make a ssh daemon for you, but I don't make it as replacement for telnet. I know about all the telnet security issues, but still, if something goes really wrong, the telnet is simplest way, how to fix it.
I can compile openssh (canon for a small bird) or dropbox and make it available as next application in custom package in MS Harmony Pack. Then you can disable telnet or change the root password and run the both daemons (telnet is inetd service so there is no memory loss, I don't know about dropbear can be started as inetd service too). This is because we are running little out of space. And yes, you're right about CIFS. Sometimes it is totally useless.
Keltek
Keltek

Messages : 23
Date d'inscription : 07/04/2010
Age : 46
Localisation : Praha - Czech Republic

http://www.fozona.cz/

Revenir en haut Aller en bas

SSH / RSYNC Empty RE : SSH / RSYNC

Message  llg Mer 5 Jan 2011 - 12:28

Keltek a écrit:Hi all, especially llg,
I can make a ssh daemon for you, but I don't make it as replacement for telnet. I know about all the telnet security issues, but still, if something goes really wrong, the telnet is simplest way, how to fix it.
I can compile openssh (canon for a small bird) or dropbox and make it available as next application in custom package in MS Harmony Pack. Then you can disable telnet or change the root password and run the both daemons (telnet is inetd service so there is no memory loss, I don't know about dropbear can be started as inetd service too). This is because we are running little out of space. And yes, you're right about CIFS. Sometimes it is totally useless.

Hi Keltek,
thanks for your purpose : should be great openssh included in MS Harmony Pack next version Smile
No matter for telnet, port 23 is blocked

Yes dropbear can be started as inetd service :
Code:
ssh    stream  tcp    nowait  root    /ssh/dropbear -r /ssh/dropbear_rsa_hostkey


Thanks

llg

llg

Messages : 11
Date d'inscription : 02/01/2011
Localisation : Paris

Revenir en haut Aller en bas

SSH / RSYNC Empty RE : RE : SSH / RSYNC

Message  llg Mer 5 Jan 2011 - 12:31

james56 a écrit:Bonjour,

Cela me parait très intéressant.
Je n'ai pas les connaissance suffisante pour l'installer tout seul, aurais-tu le temps de faire un tutos d'install pour Dropbear ?

James

Bonjour,
je vais essayer Very Happy
Sinon, pour le compiler soi-même, j'explique dans mon post précédent la procédure. Concernant l'environnement de compil buildroot, y a un autre post dans cette section expliquant comment l'installer et le configurer.

Cdlt
llg

llg

Messages : 11
Date d'inscription : 02/01/2011
Localisation : Paris

Revenir en haut Aller en bas

SSH / RSYNC Empty DropBear for MS Harmony

Message  Keltek Mer 5 Jan 2011 - 23:46

Get it here:
http://www.fozona.cz/LG/prog/dropbear.tar.gz

So how to install:
Login to PVR using telnet and do following commands:
Code:
cd /tmp/hdd/root/tmp
wget http://www.fozona.cz/LG/prog/dropbear.tar.gz
cd /tmp/hdd/root/custom
zcat /tmp/hdd/root/tmp/dropbear.tar.gz | tar xf -
mkdir -p etc/dropbear
dropbearkey -t rsa -f etc/dropbear/dropbear_rsa_host_key

add following line to /usr/local/etc/inetd.conf
Code:
ssh    stream  tcp    nowait  root    /tmp/hdd/root/custom/sbin/dropbear -r /tmp/hdd/root/custom/etc/dropbear/dropbear_rsa_host_key -i

and continue...
Code:
kill -HUP `pidof inetd`

And it's all Very Happy

As user, use 'default' with 'mugung' as password.

I include dropbear in next version with service operation in LG Menu.

EDIT: changed the bz2 to gz


Dernière édition par Keltek le Jeu 6 Jan 2011 - 9:41, édité 1 fois
Keltek
Keltek

Messages : 23
Date d'inscription : 07/04/2010
Age : 46
Localisation : Praha - Czech Republic

http://www.fozona.cz/

Revenir en haut Aller en bas

SSH / RSYNC Empty RE : DROPBEAR FOR MS HARMONY

Message  llg Jeu 6 Jan 2011 - 8:40

Hi,
to use package without Harmony installed, replace bzcat command by :

Code:
 tar -jxvf /tmp/hdd/root/tmp/dropbear.tar.bz2

as bzcat not installed by default
and add sbin/ before dropbearkey command
Regards
llg

EDIT : libraries are missing Crying or Very sad

llg

Messages : 11
Date d'inscription : 02/01/2011
Localisation : Paris

Revenir en haut Aller en bas

SSH / RSYNC Empty Re: SSH / RSYNC

Message  Keltek Jeu 6 Jan 2011 - 9:45

Without Harmony this will not work. I can try make statically linked distro, but I cannot test it.
Unfortunately I changed the file from bz2 to gz (bzip2 is installed in Harmony by default).
And as I see in previous post, dropbear needs zlib a libgcc and I forgot to compile sftp-server. Without it the dropbear is only as telnet replacement Smile and it is not what you want.
Keltek
Keltek

Messages : 23
Date d'inscription : 07/04/2010
Age : 46
Localisation : Praha - Czech Republic

http://www.fozona.cz/

Revenir en haut Aller en bas

SSH / RSYNC Empty Re: SSH / RSYNC

Message  Keltek Jeu 6 Jan 2011 - 23:34

Sad I'm unable to compile/run the sftp-server. It will always throw SIGSEGV and core is dumped. Any ideas?
Keltek
Keltek

Messages : 23
Date d'inscription : 07/04/2010
Age : 46
Localisation : Praha - Czech Republic

http://www.fozona.cz/

Revenir en haut Aller en bas

SSH / RSYNC Empty Re: SSH / RSYNC

Message  llg Ven 7 Jan 2011 - 7:23

Keltek a écrit:Sad I'm unable to compile/run the sftp-server. It will always throw SIGSEGV and core is dumped. Any ideas?

I will try tomorrow

Regards

Llg

llg

Messages : 11
Date d'inscription : 02/01/2011
Localisation : Paris

Revenir en haut Aller en bas

SSH / RSYNC Empty Re: SSH / RSYNC

Message  Contenu sponsorisé


Contenu sponsorisé


Revenir en haut Aller en bas

Revenir en haut


 
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum