To use this function add it to the class library file named PluginSSHService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: PluginSSHService.ts
Description: Orchestrator Function to Update an SSH Host
Public Function: SSHHostUpdate
publicSSHHostUpdate(objSSHHost:SSHHost,strHostFQDN:string,strUsername:string,strPassword?:string,strPassPhrase?:string,strCertificatePath?:string,arrRootFolder?:string[],blnPasswordAuthentication:boolean=true,intPort:number=22):SSHHost{
letobjSSHHostConfiguration:SSHHostConfiguration=newSSHHostConfiguration();
objSSHHostConfiguration.hostname=strHostFQDN;
objSSHHostConfiguration.port=intPort;
objSSHHostConfiguration.username=strUsername;
objSSHHostConfiguration.rootFolders=arrRootFolder;
objSSHHostConfiguration.passwordAuthentication=blnPasswordAuthentication;
if (blnPasswordAuthentication){
objSSHHostConfiguration.password=strPassword;
}else{
objSSHHostConfiguration.passphrase=strPassPhrase;
objSSHHostConfiguration.certificatePath=strCertificatePath;
}
objSSHHost=SSHHostManager.updateSshHost(objSSHHost,objSSHHostConfiguration);
returnobjSSHHost;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
