error message from skript:
[Skript] method SSHClient#connect called with (node01.39mc.top (String), 2022 (Long)) threw a NoClassDefFoundError: Could not initialize class net.schmizz.sshj.common.KeyType
[Skript] method SSHClient#authPassword called with (xxxxxxxxxx.xxxxxxx (String), xxxxxxxxxx (String)) threw a TransportException: Timeout expired
[Skript] method SSHClient#newSFTPClient called without arguments threw a IllegalStateException: Not authenticated
So I am trying to write an sftp connection skript to send certain files to my beegueCord server
base on this tutorial: https://www.baeldung.com/java-file-sftp
here is the code:
import:
java.io.File
java.io.FileInputStream
java.io.FileOutputStream
java.io.BufferedOutputStream
java.io.IOException
java.io.InputStream
java.io.OutputStream
net.schmizz.sshj.SSHClient
net.schmizz.sshj.SocketClient
net.schmizz.sshj.transport.verification.PromiscuousVerifier
function setUpSSHJ() :: object:
set {_client} to new SSHClient()
{_client}.addHostKeyVerifier(new PromiscuousVerifier())
{_client}.connect({BC.FTP::1}, {BC.FTP::2})
{_client}.authPassword({BC.FTP::3}, {BC.FTP::4})
return {_client}
function sftpUpload(player: player, localAdd: text, remoteAdd: text):
set {_sshjClient} to setUpSSHJ()
set {_sftpClient} to {_sshjClient}.newSFTPClient()
{_sftpClient}.put({_localAdd}, {_remoteAdd})
{_sftpClient}.close()
{_sshjClient}.disconnect()
command //TFAA:
trigger:
sftpUpload(player, "bcForwardingHub/test/theFirstAttemp.txt", "bcForwardingHub/test/theFirstAttemp.txt")
it threw a NoClassDefFoundError...
I need help here...
thank you very much!
[Skript] method SSHClient#connect called with (node01.39mc.top (String), 2022 (Long)) threw a NoClassDefFoundError: Could not initialize class net.schmizz.sshj.common.KeyType
[Skript] method SSHClient#authPassword called with (xxxxxxxxxx.xxxxxxx (String), xxxxxxxxxx (String)) threw a TransportException: Timeout expired
[Skript] method SSHClient#newSFTPClient called without arguments threw a IllegalStateException: Not authenticated
So I am trying to write an sftp connection skript to send certain files to my beegueCord server
base on this tutorial: https://www.baeldung.com/java-file-sftp
here is the code:
import:
java.io.File
java.io.FileInputStream
java.io.FileOutputStream
java.io.BufferedOutputStream
java.io.IOException
java.io.InputStream
java.io.OutputStream
net.schmizz.sshj.SSHClient
net.schmizz.sshj.SocketClient
net.schmizz.sshj.transport.verification.PromiscuousVerifier
function setUpSSHJ() :: object:
set {_client} to new SSHClient()
{_client}.addHostKeyVerifier(new PromiscuousVerifier())
{_client}.connect({BC.FTP::1}, {BC.FTP::2})
{_client}.authPassword({BC.FTP::3}, {BC.FTP::4})
return {_client}
function sftpUpload(player: player, localAdd: text, remoteAdd: text):
set {_sshjClient} to setUpSSHJ()
set {_sftpClient} to {_sshjClient}.newSFTPClient()
{_sftpClient}.put({_localAdd}, {_remoteAdd})
{_sftpClient}.close()
{_sshjClient}.disconnect()
command //TFAA:
trigger:
sftpUpload(player, "bcForwardingHub/test/theFirstAttemp.txt", "bcForwardingHub/test/theFirstAttemp.txt")
it threw a NoClassDefFoundError...
I need help here...
thank you very much!