README 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. This is Dropbear, a smallish SSH server and client.
  2. https://matt.ucc.asn.au/dropbear/dropbear.html
  3. INSTALL has compilation instructions.
  4. MULTI has instructions on making a multi-purpose binary (ie a single binary
  5. which performs multiple tasks, to save disk space)
  6. SMALL has some tips on creating small binaries.
  7. Please contact me if you have any questions/bugs found/features/ideas/comments etc :)
  8. There is also a mailing list http://lists.ucc.gu.uwa.edu.au/mailman/listinfo/dropbear
  9. Matt Johnston
  10. matt@ucc.asn.au
  11. In the absence of detailed documentation, some notes follow:
  12. ============================================================================
  13. Server public key auth:
  14. You can use ~/.ssh/authorized_keys in the same way as with OpenSSH, just put
  15. the key entries in that file. They should be of the form:
  16. ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAwVa6M6cGVmUcLl2cFzkxEoJd06Ub4bVDsYrWvXhvUV+ZAM9uGuewZBDoAqNKJxoIn0Hyd0Nk/yU99UVv6NWV/5YSHtnf35LKds56j7cuzoQpFIdjNwdxAN0PCET/MG8qyskG/2IE2DPNIaJ3Wy+Ws4IZEgdJgPlTYUBWWtCWOGc= someone@hostname
  17. You must make sure that ~/.ssh, and the key file, are only writable by the
  18. user. Beware of editors that split the key into multiple lines.
  19. Dropbear supports some options for authorized_keys entries, see the manpage.
  20. ============================================================================
  21. Client public key auth:
  22. Dropbear can do public key auth as a client, but you will have to convert
  23. OpenSSH style keys to Dropbear format, or use dropbearkey to create them.
  24. If you have an OpenSSH-style private key ~/.ssh/id_rsa, you need to do:
  25. dropbearconvert openssh dropbear ~/.ssh/id_rsa ~/.ssh/id_rsa.db
  26. dbclient -i ~/.ssh/id_rsa.db <hostname>
  27. Dropbear does not support encrypted hostkeys though can connect to ssh-agent.
  28. ============================================================================
  29. If you want to get the public-key portion of a Dropbear private key, look at
  30. dropbearkey's '-y' option.
  31. ============================================================================
  32. To run the server, you need to generate server keys, this is one-off:
  33. ./dropbearkey -t rsa -f dropbear_rsa_host_key
  34. ./dropbearkey -t dss -f dropbear_dss_host_key
  35. ./dropbearkey -t ecdsa -f dropbear_ecdsa_host_key
  36. ./dropbearkey -t ed25519 -f dropbear_ed25519_host_key
  37. or alternatively convert OpenSSH keys to Dropbear:
  38. ./dropbearconvert openssh dropbear /etc/ssh/ssh_host_dsa_key dropbear_dss_host_key
  39. You can also get Dropbear to create keys when the first connection is made -
  40. this is preferable to generating keys when the system boots. Make sure
  41. /etc/dropbear/ exists and then pass '-R' to the dropbear server.
  42. ============================================================================
  43. If the server is run as non-root, you most likely won't be able to allocate a
  44. pty, and you cannot login as any user other than that running the daemon
  45. (obviously). Shadow passwords will also be unusable as non-root.
  46. ============================================================================
  47. The Dropbear distribution includes a standalone version of OpenSSH's scp
  48. program. You can compile it with "make scp", you may want to change the path
  49. of the ssh binary, specified by _PATH_SSH_PROGRAM in options.h . By default
  50. the progress meter isn't compiled in to save space, you can enable it by
  51. adding 'SCPPROGRESS=1' to the make commandline.