Skip to content

sydive/RFC-913

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RFC 913: SFTP

A client and server implementation that follows the specifications detailed in the RFC 913: SFTP document.

Setup

Although this implementation is designed to be cross-platform, the associated scripts are designed to be run on a Linux system. Development was carried out using Ubuntu 20.04.4 and Windows 10 with JDK 11.

  • Please ensure the javac and java commands from JDK 11+ are on your system PATH before attempting to run
  • The Server is run on port 6789, please ensure no other processes exist on this address before starting
  • The "file system" used by this project can be found in src/resources/home

Running the Server

  1. Open a new terminal/command prompt
  2. Change directory to the scripts directory
  3. Execute the 'runServer' script with ./runServer.sh to start the server
  4. A message will be displayed stating that the server was successfully started

Running the Client

  1. Open a new terminal/command prompt
  2. Change directory to the scripts directory
  3. Execute the 'runClient' script with ./runClient.sh to start the client
  4. A message will be displayed stating that the client successfully connected to the server followed by a greeting from the server

Once a client has connected to the server, commands can be sent and the server will respond accordingly.

The available users as well as their associated accounts and passwords are shown below. Please note that users 1-5 are used during the test script and the contents of their respective folders are not to be changed. The files associated with these users can be found in src/resources/home.

User-id Account Password
user1
user2 acct1
user3 pass3
user4 acct1 pass4
user5 acct1 acct2 acct3 pass5
user6 acct1 acct2 acct3 acct4 pass6

Features

  • All commands from the RFC 913: SFTP specification have been implemented
  • The server supports multithreaded socket connections, each client connection will run on a unique thread
  • Each user is assigned a unique folder on the server which they are locked to
  • Relative and absolute filepaths are supported for the CDIR command, the user's folder is translated as the root directory

Testing

Testing Setup

  1. Ensure the server is running
  2. Open a new terminal/command prompt
  3. Change directory to the scripts directory
  4. Execute the test script with ./runTests.sh

To ensure a consistent test environment the script attempts to delete any files generated by tests; it does this once at the start and end of the test suite. If needed, the generated files can be retained by running ./runTests.sh --keep.

About

A client/server implementation of the RFC-913 SFTP specification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors