Saltar para conteúdo


Foto
- - - - -

acesso SSH a um android


  • Por favor inicie sessão para responder
1 resposta a este tópico

#1 FernandoMiguel

FernandoMiguel

    Mestre de Android

  • Former Staff
  • PipPipPipPipPipPip
  • 9430 mensagens

Mensagem publicada 02 January 2010 - 05:37

Para os q tem acompanhado, a cyanogenmod ja vem com um pekeno servidor de SSH, xamado dropbearPodem ler mais sobre a sua configuraçao aki:http://wiki.cyanogenmod.com/index.php/Connect_to_Your_Android_Device_with_SSHPasso necessarios:Create a SSH key for logging inCreate a SSH key on the machine from which you wish to connect to your phone with `puttygen` or `ssh-keygen`Place the public key into a file named `authorized_keys` on the SD cardPrepare your Android (using an SSH key)Open the terminal and become superuser/rootCreate the dropbear directoryCreate the .ssh directory and place the key into itGenerate RSA and DSA keysCreate a profile in /data/dropbear/.profile with a usable path
$ su# mkdir /data/dropbear # chmod 644 /data/dropbear# mkdir /data/dropbear/.ssh # chmod 644 /data/dropbear/.ssh # cp /sdcard/authorized_keys /data/dropbear/.ssh# chmod 600 /data/dropbear/.ssh/authorized_keys# dropbearkey -t rsa -f /data/dropbear/dropbear_rsa_host_key# dropbearkey -t dss -f /data/dropbear/dropbear_dss_host_key# echo >>/data/dropbear/.profile "PATH=/usr/bin:/usr/sbin:/bin:/sbin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin"# echo >>/data/dropbear/.profile "export PATH"
Prepare your Android Create the dropbear directoryGenerate rsa and dsa keys
# mkdir /data/dropbear# /data/local/bin/dropbearkey -t rsa -f /data/dropbear/dropbear_rsa_host_key# /data/local/bin/dropbearkey -t dss -f /data/dropbear/dropbear_dss_host_key
Connect to your AndroidStart wifi and connect to your access pointDetermine the ip of your phonePrepare/use your ssh clientStart dropbear on your phone (in verbose mode)If you want to start dropbear securely using SSH keys then use the -s -g switches to disable password authentication. Unless you do this someone without the keys can authenticate as root' class='bbc_url' title='Link Externo' rel='nofollow external'>http://www.androidpt.info/index.php?title=Root']root with no password.
# dropbear -s -g
e dps é so ligar ao android:From Linux (with SSH keyfile):$ ssh -i

#2 sismeiro

sismeiro

    Mestre de Android

  • Former Staff
  • PipPipPipPipPipPip
  • 3369 mensagens

Mensagem publicada 02 January 2010 - 16:40

Para quem tenha terminais Android a fazer de servidor de qualquer coisa na Internet fica com a administração remota facilitada com o acesso ssh. :)