Skip to content

maxgda/java-sftp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local SFTP Server for Testing

This documentation guides you through setting up a simple SFTP server implemented using the Apache Mina SSHD library, Java, and Spring Boot. This server is designed for testing.

Starting the Server

To start the server, you can either run the SftpServerApplication.java class from your IDE or use the following commands from the command line:

mvn clean install
mvn spring-boot:run

Testing SFTP Session

Execute the following command to test the SFTP session. The password is 'password'.

sftp -oPort=2222 foo@localhost

The first time you run this command, it will prompt you to add the host key to your local ~/.ssh/known_hosts file. You can now retrieve the saved host key from your known_hosts file for use.

Example prompt:

The authenticity of host '[localhost]:2222 ([::1]:2222)' can't be established.
RSA key fingerprint is SHA256:0lUTPTgivp12WiWr/6O+9BEiU1sAkzCneIlAnTNntU4.
Are you sure you want to continue connecting (yes/no)?

Additional Resources

For more detailed information on how this SFTP server is implemented, you can refer to the following articles:

  1. How to Implement an SFTP Server in Java Spring Boot using Apache Mina SSHD
  2. How to Implement an SFTP Server in Java Spring Boot using Apache Mina SSHD - Part 2: Using Public Key Authentication

About

SFTP Server for Testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages