Added specific interface binding
This commit is contained in:
@@ -35,6 +35,8 @@ public class SshdPlugin extends JavaPlugin {
|
||||
|
||||
sshd = SshServer.setUpDefaultServer();
|
||||
sshd.setPort(getConfig().getInt("port", 22));
|
||||
String host = getConfig().getString("host", "");
|
||||
sshd.setHost(host == "" ? null : host);
|
||||
|
||||
File hostKey = new File(getDataFolder(), "hostkey");
|
||||
File authorizedKeys = new File(getDataFolder(), "authorized_keys");
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# This is the port the SSH server will listen on.
|
||||
# The interface the SSH server will listen on. Leave blank for all interfaces.
|
||||
host:
|
||||
# The port the SSH server will listen on.
|
||||
port: 22
|
||||
|
||||
# By default, only public key authentication is enabled. This is the most secure mode.
|
||||
@@ -9,4 +11,4 @@ port: 22
|
||||
# For less secure username and password based authentication, complete the sections below.
|
||||
credentials:
|
||||
# user1: password1
|
||||
# user2: password2
|
||||
# user2: password2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: SSHD
|
||||
version: "1.1"
|
||||
version: "1.1.1"
|
||||
author: Ryan Michela
|
||||
main: com.ryanmichela.sshd.SshdPlugin
|
||||
Reference in New Issue
Block a user