|
|

Purpose: To add an SSH interface to your server.
Difficulty: 4/10 if you don't know ssh.
Assumed Knowledge: Basic Putty knowledge, java knowledge, packaging knowledge.
Classes Modified: None, Added contents of package and add a library.
Tested On(if it applies): Stand alone.
Download these files: [Only registered and activated users can see links. ]
Step 1: Add the package files to your src folder.
Step 2:
Import the class
Then, In your server startup method, add:Code:import org.nikki.ss*****SSHServer;
Step 3:Code:new RsSSHServer().start();
To add users, Create a new file in the main directory named "ssh_users", and add your user in this syntax:
Step 4:Code:root:password
Configure all commands you want in org.nikki.ssh.impl.SSHCommandHandler, Note: Commands are received in strings, so you must parse the strings.
An example command is already in there, named "echo".
All commands will be in this syntax.
Step 5:
Start your server and try it out!
To use Putty with it:
Download putty at [Only registered and activated users can see links. ]
Enter the following info:
IP - your server ip, localhost or your vps ip.
Port - 43593 is the default, you may change this, however port 22 will not work on linux unless root.
![]()
I have not tested this on windows, but it should work the same.
Tell me if it works please, more updates to this to come
Credits:
Nikki
Apache MINA SSHD developers

So you would be like able to shut down the server by SSH?
Cul![]()
| « [508]Staff of light 95%[525] | 613/614 Female Switching » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |