wolfSSH is a small, fast, portable SSH implementation, including support for SCP and SFTP.
 
 
 
 
 
 
Go to file
dgarske 31b411bbed Merge pull request #14 from ejohnstown/misc-inline
Update misc inline code
2016-08-10 08:56:13 -07:00
certs 1. Some files were missing from make dist. 2016-07-06 13:49:08 -07:00
examples update copyright dates and licensing to GPLv3 2016-07-19 13:44:02 -07:00
m4
src Change misc.c error to warning and exclude the misc.c code from being compiled. Most people include all .c files and by default inlining is allowed, which in turn causes an #error in misc.c and it must be excluded. Since we know its already been properly included there is no reason to throw error here. Instead, show warning and exclude code in .c file. 2016-08-09 10:44:33 -07:00
test update copyright dates and licensing to GPLv3 2016-07-19 13:44:02 -07:00
wolfssh update copyright dates and licensing to GPLv3 2016-07-19 13:44:02 -07:00
.gitignore
LICENSING update copyright dates and licensing to GPLv3 2016-07-19 13:44:02 -07:00
Makefile.am added a couple more missing files to the makefile 2016-07-20 16:22:22 -07:00
README.md 1. Added extra debugging logs to the user authentication. 2016-07-13 15:11:33 -07:00
autogen.sh
configure.ac update copyright date on configure.ac 2016-07-19 14:02:50 -07:00

README.md

wolfssh

wolfSSL's Embeddable SSH Server

building

From the source directory run:

$ ./autogen.sh
$ ./configure
$ make
$ make check

The autogen.sh script only has to be run the first time after cloning the repository. If you have already run it or are using code from a source archive, you should skip it.

examples

The directory examples contains an echoserver that any client should be able to connect to. From the terminal run:

$ ./examples/echoserver/echoserver

From another terminal run:

$ ssh_client localhost -p 22222

The server will send a canned banner to the client:

CANNED BANNER
This server is an example test server. It should have its own banner, but
it is currently using a canned one in the library. Be happy or not.

Characters typed into the client will be echoed to the screen by the server. If the characters are echoed twice, the client has local echo enabled.

testing notes

After cloning the repository, be sure to make the testing private keys read- only for the user, otherwise ssh_client will tell you to do it.

$ chmod 0600 ./certs/key-gretel.pem ./certs/key-hansel.pem \
             ./certs/key-ecc.pem

Authentication against the example echoserver can be done with a password or public key. To use a password the command line:

$ ssh_client -p 22222 USER@localhost

Where the USER and password pairs are:

jill:upthehill
jack:fetchapail

To use public key authentication use the command line:

$ ssh_client -i ./certs/key-USER.pem -p 22222 USER@localhost

Where the user can be gretel or hansel.

coding standard

  1. Exceptions are allowed with good reason.

  2. Follow the existing style.

  3. Try not to shorthand variables, except for ijk as indicies.

  4. Lengths of arrays should have the array name followed by Sz.

  5. Single return per function.

  6. Check all incoming parameters.

  7. No gotos.

  8. Check all return codes. It feels a little tedious, but the preferred method is running checks against success. This way if a function returns an error, the code will drop to the end.

    ret = functionCall(parameter);
    if (ret == SUCCESS)
        ret = secondFunctionCall(otherParameter);
    if (ret == SUCCESS)
        ret = thirdFunctionCall(aParameter, anotherParameter);
    cleanUp();
    return ret;