README 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # -*- mode: org; -*-
  2. * Examples
  3. This directory includes an examples of programs that use Guile-SSH
  4. library to access SSH protocol.
  5. Executable =.scm= files are produced from =.scm.in= files during the build
  6. process.
  7. ** =sssh.scm=
  8. Scheme Secure Shell (SSSH) uses Guile-SSH API to implement basic SSH client
  9. functionality.
  10. *** Usage
  11. Please see
  12. #+BEGIN_EXAMPLE
  13. $ ./sssh.scm --help
  14. #+END_EXAMPLE
  15. for information about program usage.
  16. *** Examples
  17. #+BEGIN_EXAMPLE
  18. $ ./sssh.scm --identity=~/.ssh/id_rsa --user=avp localhost "uname -a"
  19. #+END_EXAMPLE
  20. ** =ssshd.scm=
  21. Scheme Secure Shell Daemon (SSSHD) uses Guile-SSH API to implement basic
  22. SSH server functionality.
  23. ** =echo=
  24. Echo client and server.
  25. ** =rrepl.scm=
  26. A demo program that allows to connect to a remote REPL (RREPL) server. Pass
  27. =--help= (or =-h=) flag to the program to get usage information.
  28. ** =rpc=
  29. RPC over an SSH tunnel.
  30. ** =sscp.scm=
  31. *** Usage
  32. #+BEGIN_EXAMPLE
  33. $ sscp avp@127.0.0.1:/etc/profile profile
  34. #+END_EXAMPLE
  35. ** =pg-tunnel.scm=
  36. An example of using Guile-SSH tunnels and [[http://www.nongnu.org/guile-pg/][Guile-PG]] to access a remote
  37. PostgreSQL database.
  38. *** Usage
  39. Please see
  40. #+BEGIN_EXAMPLE
  41. $ ./pg-tunnel.scm --help
  42. #+END_EXAMPLE
  43. for information about program usage.
  44. *** Examples
  45. #+BEGIN_EXAMPLE
  46. $ ./pg-tunnel.scm --host=example.org --dbname=example --user=alice \
  47. 'select * from people'
  48. #+END_EXAMPLE
  49. ** =uptop.scm=
  50. Connect to a remote host, execute =top= command on it and print the output
  51. in uppercase letters, with terminal control characters intact.
  52. The program shows usage of remote pipes (from =(ssh popen)= module.)
  53. *** Usage
  54. #+BEGIN_EXAMPLE
  55. ./uptop.scm <hostname>
  56. #+END_EXAMPLE
  57. The program can be stopped by hitting Ctrl-C.