Jump to content

Dropbear: Difference between revisions

87 bytes removed ,  19 May 2010
Line 50: Line 50:
To enable this mode, add "-s" option at the start server command, it can be added in the devdir fs script or in the target fs directly.
To enable this mode, add "-s" option at the start server command, it can be added in the devdir fs script or in the target fs directly.


If you want to add this option in the devdir, open the file <DEVDIR>/fs/apps/dropbear.x.y/dropbear and add the option "-s" in the flag DROPBEAR_EXTRA_ARGS  
To add this option in the devdir, open the file <DEVDIR>/fs/apps/dropbear.x.y/dropbear and add the option "-s" in the flag DROPBEAR_EXTRA_ARGS  


  DROPBEAR_EXTRA_ARGS=-s
  DROPBEAR_EXTRA_ARGS=-s
Line 58: Line 58:
  /etc/init.d/dropbear start  
  /etc/init.d/dropbear start  


The first time that you run this script, you can see in the log, messages about generation of public and private keys, you can take the public key to add it in host computer, if Dropbear was started at this point, you can get the public key manually, this process must be explained in the following section.  
The first time that this script run, the scrip print in the log, messages about generation of public and private keys, you can take the public key to add it in host computer, if Dropbear was started at this point, you can get the public key manually, this process must be explained in the following section.  


If you want to add this option in the target fs directly, you need to do the same action in the script /etc/init.d/dropbear. After that, restart the application  
To add this option in the target fs directly, repeat the same action in the script /etc/init.d/dropbear. After that, restart the application  


  /etc/init.d/dropbear restart  
  /etc/init.d/dropbear restart  
Line 66: Line 66:
===How to get Dropbear public and private keys in target manually===
===How to get Dropbear public and private keys in target manually===


You can use "dropbearkey" tool to create public and private keys or see public key.
The "dropbearkey" tool creates public and private keys or show the public key.


To create an pair of keys, run the following command:
To create an pair of keys, run the following command:
Line 72: Line 72:
  $ dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
  $ dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key


The last command saves in ''/etc/dropbear/dropbear_rsa_host_key'' the private key, and prints the public key. If you want to get only the public key in the required format to authorized_keys, run the commmand:
The last command saves in ''/etc/dropbear/dropbear_rsa_host_key'' the private key, and prints the public key. To show only the public key in the required format, run the commmand:


  $ dropbearkey -y -f /etc/dropbear/dropbear_rsa_host_key | grep ssh-rsa
  $ dropbearkey -y -f /etc/dropbear/dropbear_rsa_host_key | grep ssh-rsa
Line 78: Line 78:
===How to set Dropbear public key in host===
===How to set Dropbear public key in host===


When you have the public key generated by Dropbear in your target, it must be added in the correctly host file location.
When the public key was generated by Dropbear in the target, it must be added in the correctly host file location.


The public key must added in the file
The public key must added in the file
Line 94: Line 94:
===How to get OpenSSH public and private keys in host computer===
===How to get OpenSSH public and private keys in host computer===


Running the following command, you will get two files in ''~/.ssh/'', one is named id_rsa, it's the private key (It mustn't be touched) and another that is named id_rsa.pub, this file contain the public key, this contend must be added in target location explained in the next section.
The following command, creates two files in ''~/.ssh/'', one is named id_rsa and is the private key (It mustn't be touched) and other that is named id_rsa.pub, this file contain the public key, this content must be added in target location explained in the next section.


  ssh-keygen -b 4096 -t rsa
  ssh-keygen -b 4096 -t rsa
130

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.