Skip to content

Files

Latest commit

 

History

History

examples

Examples

This directory includes an examples of programs that use Guile-SSH library to access SSH protocol.

Executable .scm files are produced from .scm.in files during the build process.

sssh.scm

Scheme Secure Shell (SSSH) uses Guile-SSH API to implement basic SSH client functionality.

Usage

Please see

$ ./sssh.scm --help

for information about program usage.

Examples

$ ./sssh.scm --identity=~/.ssh/id_rsa --user=avp localhost "uname -a"

ssshd.scm

Scheme Secure Shell Daemon (SSSHD) uses Guile-SSH API to implement basic SSH server functionality.

echo

Echo client and server.

rrepl.scm

A demo program that allows to connect to a remote REPL (RREPL) server. Pass --help (or -h) flag to the program to get usage information.

rpc

RPC over an SSH tunnel.

sscp.scm

Usage

$ sscp avp@127.0.0.1:/etc/profile profile

pg-tunnel.scm

An example of using Guile-SSH tunnels and Guile-PG to access a remote PostgreSQL database.

Usage

Please see

$ ./pg-tunnel.scm --help

for information about program usage.

Examples

$ ./pg-tunnel.scm --host=example.org --dbname=example --user=alice \
    'select * from people'

uptop.scm

Connect to a remote host, execute top command on it and print the output in uppercase letters, with terminal control characters intact.

The program shows usage of remote pipes (from (ssh popen) module.)

Usage

./uptop.scm <hostname>

The program can be stopped by hitting Ctrl-C.