Can configure BTCPay SSH connection at startup

This commit is contained in:
nicolas.dorier
2018-08-12 21:38:45 +09:00
parent 29513d4ded
commit 6a1eca760a
13 changed files with 318 additions and 29 deletions

View File

@@ -3,12 +3,14 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Configuration;
using Renci.SshNet;
namespace BTCPayServer.Models.ServerViewModels
{
public class MaintenanceViewModel
{
public bool ExposedSSH { get; set; }
[Required]
public string UserName { get; set; }
[Required]
@@ -20,5 +22,15 @@ namespace BTCPayServer.Models.ServerViewModels
{
return new SshClient(host, UserName, Password);
}
internal void SetConfiguredSSH(SSHSettings settings)
{
if(settings != null)
{
ExposedSSH = true;
UserName = "unknown";
Password = "unknown";
}
}
}
}