Завершение обновления безопасности.

v++
This commit is contained in:
2025-02-21 01:57:15 +03:00
parent 49f0a56c4f
commit 8701c8ba36
23 changed files with 230 additions and 41 deletions

View File

@@ -24,12 +24,22 @@ public abstract class RepositoryServerSSHPass<S extends RepositoryServer> extend
}
protected abstract S getServer();
@Override
protected boolean canStart(Object... args) throws Exception {
if (!Global.mainModule.getAccount().CheckAdmin(Log))
return false;
if (Global.normalProperties.ServerUserPassword.isEmpty()){
Log.Writeln_("Не задан пароль");
return false;
}
return true;
}
@Override
public void Connect() throws Exception {
userHome = null;
serverHome = null;
//--
machine = new Machine("alex", Constants.ServerAddress, Constants.ServerUserSHHPort, MachineType.Server);
user = new User(Constants.ServerUserName, Constants.ServerUserPasword);
user = new User(Constants.ServerUserName, Global.normalProperties.ServerUserPassword); //в пропертиес. пусть админ пользуется.
super.Connect();
//--
userHome = new RemoteFile(user.connection.sftpChannel.getHome(), true);