我正在尝试使用JSch进行sftp。但是我在session.connect()
期间遇到异常,如下所示。
使用sftp服务器作为Bitvise(个人版)
注意到这仅适用于3des-cbc和aes128-cbc加密算法。当我在服务器中选择任何ctr算法(如aes128-ctr,aes192-ctr,aes256-ctr)时,我才会遇到这个问题。
com.jcraft.jsch.JSchException: Packet corrupt
at com.jcraft.jsch.Session.start_discard(Session.java:1067)
at com.jcraft.jsch.Session.read(Session.java:937)
at com.jcraft.jsch.UserAuthNone.start(UserAuthNone.java:56)
at com.jcraft.jsch.Session.connect(Session.java:396)
at com.jcraft.jsch.Session.connect(Session.java:183)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
这是一个jsch bug
以下是日志。
<?xml version="1.0" encoding="UTF-8" ?>
<log>
<start time="2017-11-28 10:57:02.441373 +0000" appName="BvSshServer" appVersion="7.35" thisFile="C:\Program Files\Bitvise SSH Server\Logs\BvSshServer20171128-105702440-P0000.log"/>
<event seq="1" time="2017-11-28 10:57:02.440330 +0000" app="BvSshServer 7.35" name="I_SERVICE_CONFIG_DESCRIPTION" desc="Configuration description.">
<parameters configPart="ServerSettings"/>
<change time="2017-11-28 10:55:13.058180 +0000" action="Settings edited via local Advanced Settings interface by 'CENTRAL\abdull'." process="BssCtrl.exe"/>
<change time="2017-11-28 10:54:39.857622 +0000" action="Settings edited via local Advanced Settings interface by 'CENTRAL\abdull'." process="BssCtrl.exe"/>
<change time="2017-11-28 10:53:08.676523 +0000" action="Settings edited via local Advanced Settings interface by 'CENTRAL\abdull'." process="BssCtrl.exe"/>
<change time="2017-11-28 10:50:46.160976 +0000" action="Settings edited via local Advanced Settings interface by 'CENTRAL\abdull'." process="BssCtrl.exe"/>
<change time="2017-11-28 10:48:26.592495 +0000" action="Settings edited via local Advanced Settings interface by 'CENTRAL\abdull'." process="BssCtrl.exe"/>
<settings>
<powerShell><![CDATA[
$cfg = new-object -com "BssCfg726.BssCfg726"
$cfg.settings.SetDefaults()
$cfg.settings.algs.SetDefaults()
$cfg.settings.algs.kex.SetDefaults()
$cfg.settings.algs.kex.gssGexSha1Krb5 = $false
$cfg.settings.algs.kex.gssG15Sha512Krb5 = $false
$cfg.settings.algs.kex.gssG14Sha256Krb5 = $false
$cfg.settings.algs.kex.gssG14Sha1Krb5 = $false
$cfg.settings.algs.encr.SetDefaults()
$cfg.settings.algs.encr.aes256_cbc = $true
$cfg.settings.session.SetDefaults()
$cfg.settings.session.maxTotalSessions = 600
$cfg.settings.access.SetDefaults()
$cfg.settings.access.kerberos5Auth = 1 # $cfg.AuthDispND.disabled
$cfg.settings.access.ntlmAuth = 1 # $cfg.AuthDispND.disabled
$cfg.settings.access.virtAccountsEx.Clear()
$cfg.settings.access.virtAccountsEx.new.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.virtAccount = "abdul"
$cfg.settings.access.virtAccountsEx.new.virtPassword.crypt = "0A957102C552FE8303FB90DCFFB1E782897160E44AEA6239D9DA39695EF9C32368661C3A33135CBF"
$cfg.settings.access.virtAccountsEx.new.group = "Virtual Users"
$cfg.settings.access.virtAccountsEx.new.loginAllowed = 1 # $cfg.DefaultYesNo.yes
$cfg.settings.access.virtAccountsEx.new.term.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.term.shellAccessType = 4 # $cfg.ShellAccessWD.powershell
$cfg.settings.access.virtAccountsEx.new.xfer.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.xfer.permitScp = 1 # $cfg.DefaultYesNo.yes
$cfg.settings.access.virtAccountsEx.new.xfer.permitSftp = 1 # $cfg.DefaultYesNo.yes
$cfg.settings.access.virtAccountsEx.new.xfer.inheritMountPoints = $false
$cfg.settings.access.virtAccountsEx.new.xfer.mountPointsEx.Clear()
$cfg.settings.access.virtAccountsEx.new.xfer.mountPointsEx.new.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.xfer.mountPointsEx.new.realRootPath = "C:\Users\abdull\Desktop\FCAD"
$cfg.settings.access.virtAccountsEx.new.xfer.mountPointsEx.NewCommit()
$cfg.settings.access.virtAccountsEx.new.xfer.useDefaultSfsHomeDir = $false
$cfg.settings.access.virtAccountsEx.new.xfer.sfsHomeDir = "/"
$cfg.settings.access.virtAccountsEx.new.fwding.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.fwding.permitC2S = 2 # $cfg.DefaultYesNo.no
$cfg.settings.access.virtAccountsEx.new.fwding.permitS2C = 2 # $cfg.DefaultYesNo.no
$cfg.settings.access.virtAccountsEx.NewCommit()
$cfg.SaveServerSettings()
]]></powerShell>
</settings>
</event>
<event seq="2" time="2017-11-28 10:57:02.441526 +0000" app="BvSshServer 7.35" name="I_SERVICE_CONFIG_DESCRIPTION" desc="Configuration description.">
<parameters configPart="HostKeys"/>
<keypair algorithm="RSA" keyBits="3072" md5="2b:16:18:83:7b:c6:5e:49:f2:f0:8e:e2:dc:64:da:1a" babble="xutog-sabeg-tunur-gytin-sefal-mikus-gamat-zubeh-zozag-kepal-toxix" sha256="CiAWVUMB0+KqGRnwQ7/CwZiKSXLvnSVZOPvdjd+T+dM"/>
<keypair algorithm="ECDSA/nistp384" keyBits="384" md5="6f:9d:1a:2f:6c:24:63:e8:ad:1e:06:f9:40:83:17:c4" babble="xucik-gotik-betib-sahit-lekud-labum-visid-natif-tysid-sosir-gixix" sha256="PtWOhG9HsoCfuFFCy4hxOwPW4QTTZohWe5UJ2OQ36dk"/>
</event>
<event seq="3" time="2017-11-28 10:57:02.692622 +0000" app="BvSshServer 7.35" name="I_AUTO_ACCOUNT_ENABLED" desc="Enabled the automatically managed local account for virtual users.">
<parameters account="BvSsh_VirtualUsers"/>
</event>
<event seq="4" time="2017-11-28 10:57:03.086919 +0000" app="BvSshServer 7.35" name="I_SERVICE_SOCKET_BOUND" desc="Listening socket bound.">
<parameters listenAddress="0.0.0.0:22" service="SSH"/>
</event>
<event seq="5" time="2017-11-28 10:57:03.093938 +0000" app="BvSshServer 7.35" name="I_FIREWALL_EXCEPTION_ADDED" desc="Windows Firewall exception added.">
<parameters port="22" scope="Local" type="TCP/IPv4"/>
</event>
<event seq="6" time="2017-11-28 10:57:03.096506 +0000" app="BvSshServer 7.35" name="I_SERVICE_SOCKET_BOUND" desc="Listening socket bound.">
<parameters listenAddress="[::]:22" service="SSH"/>
</event>
<event seq="7" time="2017-11-28 10:57:03.103265 +0000" app="BvSshServer 7.35" name="I_FIREWALL_EXCEPTION_ADDED" desc="Windows Firewall exception added.">
<parameters port="22" scope="Local" type="TCP/IPv6"/>
</event>
<event seq="8" time="2017-11-28 10:57:03.103669 +0000" app="BvSshServer 7.35" name="I_SERVICE_CONF_SYNC_SETTINGS_DESCRIPTION" desc="Description of synchronization settings.">
<settings>
<powerShell><![CDATA[
$cfg = new-object -com "BssCfg726.BssCfg726"
$cfg.instance.SetDefaults()
$cfg.InstanceType_SaveSettings()
]]></powerShell>
</settings>
</event>
<event seq="9" time="2017-11-28 10:57:03.103710 +0000" app="BvSshServer 7.35" name="I_SERVICE_CONF_SYNC_SETTINGS_APPLIED" desc="Synchronization settings successfully applied."/>
<event seq="10" time="2017-11-28 10:57:03.105654 +0000" app="BvSshServer 7.35" name="I_SERVICE_STARTED" desc="Service started.">
<parameters serviceAccount="NT AUTHORITY\SYSTEM" sessionId="0" processId="11168" exePath="C:\Program Files\Bitvise SSH Server\BvSshServer.exe" cryptoProvider="Windows CNG (x64) with additions" bootTime="2017-11-10 06:32:59 +0000" computerName="DW7-ABDULL" computerSid="S-1-5-21-3842398330-100599899-1213948998" computerDomainName="CENTRAL" computerDnsDomainName="central.local" windowsVersion="6.1.7601 (64-bit)" servicePack="1" isDomainController="false" lsaProtection="0" lsaAuthPackages="msv1_0; BvLsaEx" bvLsaFileSize="321776" bvLsaLastInitTime="2017-11-10 06:32:40 +0000" bvLsaVersion="20.0.0.0"/>
</event>
<event seq="11" time="2017-11-28 10:57:07.398209 +0000" app="BvSshServer 7.35" name="I_CONNECT_ACCEPTED" desc="Connection accepted.">
<session id="1001" service="SSH" remoteAddress="127.0.0.1:59868"/>
<parameters addressRule="AnyIP" listenAddress="127.0.0.1:22"/>
</event>
<event seq="12" time="2017-11-28 10:57:07.401015 +0000" app="BvSshServer 7.35" name="I_CONNECT_VERSION_RECEIVED" desc="Client version string received.">
<session id="1001" service="SSH" remoteAddress="127.0.0.1:59868"/>
<parameters clientVersion="SSH-2.0-JSCH-0.1.54"/>
</event>
<event seq="13" time="2017-11-28 10:57:07.453490 +0000" app="BvSshServer 7.35" name="I_SESSION_KEY_EXCHANGE_ALGORITHMS" desc="Key exchange algorithms.">
<session id="1001" service="SSH" remoteAddress="127.0.0.1:59868"/>
<parameters kexAlg="diffie-hellman-group-exchange-sha1" cipherAlgIn="aes128-ctr" cipherAlgOut="aes128-ctr" macAlgIn="hmac-sha1" macAlgOut="hmac-sha1" comprAlgIn="zlib" comprAlgOut="zlib"/>
</event>
<event seq="14" time="2017-11-28 10:57:32.518050 +0000" app="BvSshServer 7.35" name="I_SESSION_DISCONNECTED_NORMALLY" desc="Session disconnected normally.">
<session id="1001" service="SSH" remoteAddress="127.0.0.1:59868"/>
<parameters disconnectReason="EofReceived"/>
<help message="The client has disconnected the session by sending EOF."/>
</event>
<event seq="15" time="2017-11-28 10:57:32.599469 +0000" app="BvSshServer 7.35" name="I_CONNECT_ACCEPTED" desc="Connection accepted.">
<session id="1002" service="SSH" remoteAddress="127.0.0.1:59871"/>
<parameters addressRule="AnyIP" listenAddress="127.0.0.1:22"/>
</event>
<event seq="16" time="2017-11-28 10:57:32.599907 +0000" app="BvSshServer 7.35" name="I_CONNECT_VERSION_RECEIVED" desc="Client version string received.">
<session id="1002" service="SSH" remoteAddress="127.0.0.1:59871"/>
<parameters clientVersion="SSH-2.0-JSCH-0.1.54"/>
</event>
<event seq="17" time="2017-11-28 10:57:32.618462 +0000" app="BvSshServer 7.35" name="I_SESSION_KEY_EXCHANGE_ALGORITHMS" desc="Key exchange algorithms.">
<session id="1002" service="SSH" remoteAddress="127.0.0.1:59871"/>
<parameters kexAlg="diffie-hellman-group-exchange-sha1" cipherAlgIn="aes128-ctr" cipherAlgOut="aes128-ctr" macAlgIn="hmac-sha1" macAlgOut="hmac-sha1" comprAlgIn="zlib" comprAlgOut="zlib"/>
</event>
<event seq="18" time="2017-11-28 10:57:57.611643 +0000" app="BvSshServer 7.35" name="I_SESSION_DISCONNECTED_NORMALLY" desc="Session disconnected normally.">
<session id="1002" service="SSH" remoteAddress="127.0.0.1:59871"/>
<parameters disconnectReason="EofReceived"/>
<help message="The client has disconnected the session by sending EOF."/>
</event>
<event seq="19" time="2017-11-28 10:58:12.691021 +0000" app="BvSshServer 7.35" name="I_SERVICE_CONFIG_DESCRIPTION" desc="Configuration description.">
<parameters configPart="ServerSettings"/>
<change time="2017-11-28 10:58:12.181097 +0000" action="Settings edited via local Advanced Settings interface by 'CENTRAL\abdull'." process="BssCtrl.exe"/>
<settings>
<powerShell><![CDATA[
$cfg = new-object -com "BssCfg726.BssCfg726"
$cfg.settings.SetDefaults()
$cfg.settings.algs.SetDefaults()
$cfg.settings.algs.kex.SetDefaults()
$cfg.settings.algs.kex.gssGexSha1Krb5 = $false
$cfg.settings.algs.kex.gssG15Sha512Krb5 = $false
$cfg.settings.algs.kex.gssG14Sha256Krb5 = $false
$cfg.settings.algs.kex.gssG14Sha1Krb5 = $false
$cfg.settings.algs.encr.SetDefaults()
$cfg.settings.algs.encr.aes256_cbc = $true
$cfg.settings.algs.encr.aes128_cbc = $true
$cfg.settings.session.SetDefaults()
$cfg.settings.session.maxTotalSessions = 600
$cfg.settings.access.SetDefaults()
$cfg.settings.access.kerberos5Auth = 1 # $cfg.AuthDispND.disabled
$cfg.settings.access.ntlmAuth = 1 # $cfg.AuthDispND.disabled
$cfg.settings.access.virtAccountsEx.Clear()
$cfg.settings.access.virtAccountsEx.new.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.virtAccount = "abdul"
$cfg.settings.access.virtAccountsEx.new.virtPassword.crypt = "0A957102C552FE8303FB90DCFFB1E782897160E44AEA6239D9DA39695EF9C32368661C3A33135CBF"
$cfg.settings.access.virtAccountsEx.new.group = "Virtual Users"
$cfg.settings.access.virtAccountsEx.new.loginAllowed = 1 # $cfg.DefaultYesNo.yes
$cfg.settings.access.virtAccountsEx.new.term.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.term.shellAccessType = 4 # $cfg.ShellAccessWD.powershell
$cfg.settings.access.virtAccountsEx.new.xfer.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.xfer.permitScp = 1 # $cfg.DefaultYesNo.yes
$cfg.settings.access.virtAccountsEx.new.xfer.permitSftp = 1 # $cfg.DefaultYesNo.yes
$cfg.settings.access.virtAccountsEx.new.xfer.inheritMountPoints = $false
$cfg.settings.access.virtAccountsEx.new.xfer.mountPointsEx.Clear()
$cfg.settings.access.virtAccountsEx.new.xfer.mountPointsEx.new.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.xfer.mountPointsEx.new.realRootPath = "C:\Users\abdull\Desktop\FCAD"
$cfg.settings.access.virtAccountsEx.new.xfer.mountPointsEx.NewCommit()
$cfg.settings.access.virtAccountsEx.new.xfer.useDefaultSfsHomeDir = $false
$cfg.settings.access.virtAccountsEx.new.xfer.sfsHomeDir = "/"
$cfg.settings.access.virtAccountsEx.new.fwding.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.fwding.permitC2S = 2 # $cfg.DefaultYesNo.no
$cfg.settings.access.virtAccountsEx.new.fwding.permitS2C = 2 # $cfg.DefaultYesNo.no
$cfg.settings.access.virtAccountsEx.NewCommit()
$cfg.SaveServerSettings()
]]></powerShell>
</settings>
</event>
<event seq="20" time="2017-11-28 10:58:12.698356 +0000" app="BvSshServer 7.35" name="I_SERVICE_CONFIG_RELOAD_SUCCESS" desc="Configuration reloaded successfully.">
<parameters configPart="ServerSettings"/>
<help message="Reloaded settings have been applied."/>
</event>
<event seq="21" time="2017-11-28 10:58:14.687912 +0000" app="BvSshServer 7.35" name="I_CONNECT_ACCEPTED" desc="Connection accepted.">
<session id="1003" service="SSH" remoteAddress="127.0.0.1:59880"/>
<parameters addressRule="AnyIP" listenAddress="127.0.0.1:22"/>
</event>
<event seq="22" time="2017-11-28 10:58:14.688506 +0000" app="BvSshServer 7.35" name="I_CONNECT_VERSION_RECEIVED" desc="Client version string received.">
<session id="1003" service="SSH" remoteAddress="127.0.0.1:59880"/>
<parameters clientVersion="SSH-2.0-JSCH-0.1.54"/>
</event>
<event seq="23" time="2017-11-28 10:58:14.706426 +0000" app="BvSshServer 7.35" name="I_SESSION_KEY_EXCHANGE_ALGORITHMS" desc="Key exchange algorithms.">
<session id="1003" service="SSH" remoteAddress="127.0.0.1:59880"/>
<parameters kexAlg="diffie-hellman-group-exchange-sha1" cipherAlgIn="aes128-cbc" cipherAlgOut="aes128-cbc" macAlgIn="hmac-sha1" macAlgOut="hmac-sha1" comprAlgIn="zlib" comprAlgOut="zlib"/>
</event>
<event seq="24" time="2017-11-28 10:58:14.763753 +0000" app="BvSshServer 7.35" name="I_LOGON_AUTH_SUCCEEDED" desc="User authentication succeeded.">
<session id="1003" service="SSH" remoteAddress="127.0.0.1:59880" virtualAccount="abdul" windowsAccount="DW7-ABDULL\BvSsh_VirtualUsers"/>
<authentication attemptNr="1" userName="abdul" method="password"/>
<parameters accountSettings="abdul" groupSettings="Virtual Users" tokenType="LogonUser" tokenLogonType="Network"/>
</event>
<event seq="25" time="2017-11-28 10:58:14.771364 +0000" app="BvSshServer 7.35" name="I_CHANNEL_SESSION_OPENED" desc="Session channel opened.">
<session id="1003" service="SSH" remoteAddress="127.0.0.1:59880" virtualAccount="abdul" windowsAccount="DW7-ABDULL\BvSsh_VirtualUsers"/>
<channel type="session" id="1"/>
</event>
<event seq="26" time="2017-11-28 10:58:14.840991 +0000" app="BvSshServer 7.35" name="I_SFTP_SERVER_VERSION_NEGOTIATED" desc="SFTP protocol version negotiated.">
<session id="1003" service="SSH" remoteAddress="127.0.0.1:59880" virtualAccount="abdul" windowsAccount="DW7-ABDULL\BvSsh_VirtualUsers"/>
<channel type="session" id="1"/>
<parameters versionRequested="3" versionSelected="3"/>
</event>
<event seq="27" time="2017-11-28 10:58:14.843764 +0000" app="BvSshServer 7.35" name="I_SFS_GET_FILE_STATUS" desc="Virtual filesystem: get file status.">
<session id="1003" service="SSH" remoteAddress="127.0.0.1:59880" virtualAccount="abdul" windowsAccount="DW7-ABDULL\BvSsh_VirtualUsers"/>
<channel type="session" id="1"/>
<sfs moduleName="FlowSfsWin" mountPath="/" code="24200" desc="Getting file status failed.">
<parameters path="C:\Users\abdull\Desktop\FCAD\largefile.txt.temp" flags="0x8000002F" statusCode="NoSuchFile"/>
<error type="WinApi" operation="CreateFile()" code="2" message="The system cannot find the file specified."/>
</sfs>
</event>
<event seq="28" time="2017-11-28 10:58:19.982707 +0000" app="BvSshServer 7.35" name="I_SFS_TRANSFER_FILE" desc="Virtual filesystem: transfer file.">
<session id="1003" service="SSH" remoteAddress="127.0.0.1:59880" virtualAccount="abdul" windowsAccount="DW7-ABDULL\BvSsh_VirtualUsers"/>
<channel type="session" id="1"/>
<sfs moduleName="FlowSfsWin" mountPath="/" code="90000" desc="Transferring file ended.">
<parameters path="C:\Users\abdull\Desktop\FCAD\largefile.txt.temp" timeMs="5145" bytesRead="0" bytesWritten="67487504" readRangeOffset="0" readRangeLength="0" writeRangeOffset="0" writeRangeLength="67487504" createdNewFile="true" resizedFile="false" endedBy="Client"/>
<help message="File transfer ended by client."/>
</sfs>
</event>
<event seq="29" time="2017-11-28 10:58:19.983699 +0000" app="BvSshServer 7.35" name="I_SFS_GET_FILE_STATUS" desc="Virtual filesystem: get file status.">
<session id="1003" service="SSH" remoteAddress="127.0.0.1:59880" virtualAccount="abdul" windowsAccount="DW7-ABDULL\BvSsh_VirtualUsers"/>
<channel type="session" id="1"/>
<sfs moduleName="FlowSfsWin" mountPath="/" code="24000" desc="Getting file status succeeded.">
<parameters path="C:\Users\abdull\Desktop\FCAD\largefile.txt.temp" how="NoFollow" flags="0x8000002F" partialFailure="false"/>
</sfs>
</event>
<event seq="30" time="2017-11-28 10:58:19.994790 +0000" app="BvSshServer 7.35" name="I_SFS_RENAME_PATH" desc="Virtual filesystem: rename path.">
<session id="1003" service="SSH" remoteAddress="127.0.0.1:59880" virtualAccount="abdul" windowsAccount="DW7-ABDULL\BvSsh_VirtualUsers"/>
<channel type="session" id="1"/>
<sfs moduleName="FlowSfsWin" mountPath="/" code="32000" desc="Renaming path succeeded.">
<parameters oldPath="C:\Users\abdull\Desktop\FCAD\largefile.txt.temp" newPath="C:\Users\abdull\Desktop\FCAD\largefile.txt" flags="0x3"/>
</sfs>
</event>
<event seq="31" time="2017-11-28 10:58:20.105301 +0000" app="BvSshServer 7.35" name="I_CHANNEL_SESSION_CLOSED" desc="Session channel closed.">
<session id="1003" service="SSH" remoteAddress="127.0.0.1:59880" virtualAccount="abdul" windowsAccount="DW7-ABDULL\BvSsh_VirtualUsers"/>
<channel type="session" id="1"/>
</event>
<event seq="32" time="2017-11-28 10:58:20.105456 +0000" app="BvSshServer 7.35" name="I_SESSION_DISCONNECTED_NORMALLY" desc="Session disconnected normally.">
<session id="1003" service="SSH" remoteAddress="127.0.0.1:59880" virtualAccount="abdul" windowsAccount="DW7-ABDULL\BvSsh_VirtualUsers"/>
<parameters disconnectReason="EofReceived"/>
<help message="The client has disconnected the session by sending EOF."/>
</event>
<event seq="33" time="2017-11-28 11:15:28.339452 +0000" app="BvSshServer 7.35" name="I_SERVICE_CONFIG_DESCRIPTION" desc="Configuration description.">
<parameters configPart="ServerSettings"/>
<change time="2017-11-28 11:15:27.807306 +0000" action="Settings edited via local Advanced Settings interface by 'CENTRAL\abdull'." process="BssCtrl.exe"/>
<settings>
<powerShell><![CDATA[
$cfg = new-object -com "BssCfg726.BssCfg726"
$cfg.settings.SetDefaults()
$cfg.settings.algs.SetDefaults()
$cfg.settings.algs.kex.SetDefaults()
$cfg.settings.algs.kex.gssGexSha1Krb5 = $false
$cfg.settings.algs.kex.gssG15Sha512Krb5 = $false
$cfg.settings.algs.kex.gssG14Sha256Krb5 = $false
$cfg.settings.algs.kex.gssG14Sha1Krb5 = $false
$cfg.settings.algs.encr.SetDefaults()
$cfg.settings.algs.encr.aes256_cbc = $true
$cfg.settings.session.SetDefaults()
$cfg.settings.session.maxTotalSessions = 600
$cfg.settings.access.SetDefaults()
$cfg.settings.access.kerberos5Auth = 1 # $cfg.AuthDispND.disabled
$cfg.settings.access.ntlmAuth = 1 # $cfg.AuthDispND.disabled
$cfg.settings.access.virtAccountsEx.Clear()
$cfg.settings.access.virtAccountsEx.new.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.virtAccount = "abdul"
$cfg.settings.access.virtAccountsEx.new.virtPassword.crypt = "0A957102C552FE8303FB90DCFFB1E782897160E44AEA6239D9DA39695EF9C32368661C3A33135CBF"
$cfg.settings.access.virtAccountsEx.new.group = "Virtual Users"
$cfg.settings.access.virtAccountsEx.new.loginAllowed = 1 # $cfg.DefaultYesNo.yes
$cfg.settings.access.virtAccountsEx.new.term.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.term.shellAccessType = 4 # $cfg.ShellAccessWD.powershell
$cfg.settings.access.virtAccountsEx.new.xfer.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.xfer.permitScp = 1 # $cfg.DefaultYesNo.yes
$cfg.settings.access.virtAccountsEx.new.xfer.permitSftp = 1 # $cfg.DefaultYesNo.yes
$cfg.settings.access.virtAccountsEx.new.xfer.inheritMountPoints = $false
$cfg.settings.access.virtAccountsEx.new.xfer.mountPointsEx.Clear()
$cfg.settings.access.virtAccountsEx.new.xfer.mountPointsEx.new.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.xfer.mountPointsEx.new.realRootPath = "C:\Users\abdull\Desktop\FCAD"
$cfg.settings.access.virtAccountsEx.new.xfer.mountPointsEx.NewCommit()
$cfg.settings.access.virtAccountsEx.new.xfer.useDefaultSfsHomeDir = $false
$cfg.settings.access.virtAccountsEx.new.xfer.sfsHomeDir = "/"
$cfg.settings.access.virtAccountsEx.new.fwding.SetDefaults()
$cfg.settings.access.virtAccountsEx.new.fwding.permitC2S = 2 # $cfg.DefaultYesNo.no
$cfg.settings.access.virtAccountsEx.new.fwding.permitS2C = 2 # $cfg.DefaultYesNo.no
$cfg.settings.access.virtAccountsEx.NewCommit()
$cfg.SaveServerSettings()
]]></powerShell>
</settings>
</event>
<event seq="34" time="2017-11-28 11:15:28.347338 +0000" app="BvSshServer 7.35" name="I_SERVICE_CONFIG_RELOAD_SUCCESS" desc="Configuration reloaded successfully.">
<parameters configPart="ServerSettings"/>
<help message="Reloaded settings have been applied."/>
</event>
<event seq="35" time="2017-11-28 11:15:30.038971 +0000" app="BvSshServer 7.35" name="I_CONNECT_ACCEPTED" desc="Connection accepted.">
<session id="1004" service="SSH" remoteAddress="127.0.0.1:59943"/>
<parameters addressRule="AnyIP" listenAddress="127.0.0.1:22"/>
</event>
<event seq="36" time="2017-11-28 11:15:30.040091 +0000" app="BvSshServer 7.35" name="I_CONNECT_VERSION_RECEIVED" desc="Client version string received.">
<session id="1004" service="SSH" remoteAddress="127.0.0.1:59943"/>
<parameters clientVersion="SSH-2.0-JSCH-0.1.54"/>
</event>
<event seq="37" time="2017-11-28 11:15:30.063779 +0000" app="BvSshServer 7.35" name="I_SESSION_KEY_EXCHANGE_ALGORITHMS" desc="Key exchange algorithms.">
<session id="1004" service="SSH" remoteAddress="127.0.0.1:59943"/>
<parameters kexAlg="diffie-hellman-group-exchange-sha1" cipherAlgIn="aes128-ctr" cipherAlgOut="aes128-ctr" macAlgIn="hmac-sha1" macAlgOut="hmac-sha1" comprAlgIn="zlib" comprAlgOut="zlib"/>
</event>
<event seq="38" time="2017-11-28 11:15:55.056124 +0000" app="BvSshServer 7.35" name="I_SESSION_DISCONNECTED_NORMALLY" desc="Session disconnected normally.">
<session id="1004" service="SSH" remoteAddress="127.0.0.1:59943"/>
<parameters disconnectReason="EofReceived"/>
<help message="The client has disconnected the session by sending EOF."/>
</event>
<event seq="39" time="2017-11-28 11:15:55.137667 +0000" app="BvSshServer 7.35" name="I_CONNECT_ACCEPTED" desc="Connection accepted.">
<session id="1005" service="SSH" remoteAddress="127.0.0.1:59944"/>
<parameters addressRule="AnyIP" listenAddress="127.0.0.1:22"/>
</event>
<event seq="40" time="2017-11-28 11:15:55.138109 +0000" app="BvSshServer 7.35" name="I_CONNECT_VERSION_RECEIVED" desc="Client version string received.">
<session id="1005" service="SSH" remoteAddress="127.0.0.1:59944"/>
<parameters clientVersion="SSH-2.0-JSCH-0.1.54"/>
</event>
<event seq="41" time="2017-11-28 11:15:55.153344 +0000" app="BvSshServer 7.35" name="I_SESSION_KEY_EXCHANGE_ALGORITHMS" desc="Key exchange algorithms.">
<session id="1005" service="SSH" remoteAddress="127.0.0.1:59944"/>
<parameters kexAlg="diffie-hellman-group-exchange-sha1" cipherAlgIn="aes128-ctr" cipherAlgOut="aes128-ctr" macAlgIn="hmac-sha1" macAlgOut="hmac-sha1" comprAlgIn="zlib" comprAlgOut="zlib"/>
</event>
<event seq="42" time="2017-11-28 11:16:20.067774 +0000" app="BvSshServer 7.35" name="I_SESSION_DISCONNECTED_NORMALLY" desc="Session disconnected normally.">
<session id="1005" service="SSH" remoteAddress="127.0.0.1:59944"/>
<parameters disconnectReason="EofReceived"/>
<help message="The client has disconnected the session by sending EOF."/>
</event>
</log>