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