• NeonSDK
  • NeonKUBE
Search Results for

    Show / Hide Table of Contents
    • Neon
      • Build
    • Neon.Blazor
      • BlazorHelper
      • BodyOutlet
      • ClientRenderContext
      • DOMRectReadOnly
      • EventHandlers
      • FileDownloader
      • HtmlElement
      • IRenderContext
      • IntersectionChangedEventArgs
      • IntersectionObserver
      • IntersectionObserverContext
      • MobileDetector
      • NeonBlazorExtensions
      • ServerRenderContext
      • SwipeDirection
      • SwipeHandler
    • Neon.Blazor.Analyzers
      • SvgGenerator
      • SvgGenerator.Svg
    • Neon.BuildInfo
      • ThisAssembly
      • ThisAssembly.Git
      • ThisAssembly.Git.BaseVersion
      • ThisAssembly.Git.SemVer
    • Neon.CSharp
      • CSharpHelper
      • CompilerErrorException
      • MetadataReferences
    • Neon.Cassandra
      • KeyspaceStatus
      • RowSetExtensions
      • SchemaManager
      • SchemaManagerException
      • SchemaStatus
      • SessionExtensions
    • Neon.Collections
      • ArgDictionary
      • Bits
      • IObjectDictionary
      • NiceDictionary<TKey, TValue>
      • ObjectDictionary
    • Neon.Common
      • AppDomainExtensions
      • Block
      • BlockArray
      • ByteEncoding
      • ByteUnits
      • CommandLine
      • CommandLine.OptionDefinition
      • CommandLine.Redactor
      • CpuArchitecture
      • Credentials
      • DateTimeExtensions
      • EnumExtensions
      • EnvironmentParser
      • EnvironmentParser.Parser<T>
      • EnvironmentParser.Validator<T>
      • EnvironmentParser.VariableSource
      • ExceptionExtensions
      • ExecuteException
      • ExecuteResponse
      • GlobPattern
      • HexDumpOption
      • HttpClientExtensions
      • HttpResponseMessageExtensions
      • IEnumerableExtensions
      • ILabeled
      • IOExtensions
      • IServiceContainer
      • IStaticDirectoryExtensions
      • LabelSelector
      • LabelSelectorOptions
      • LabelSelector<TItem>
      • NeonAssemblyExtensions
      • NeonExtendedHelper
      • NeonHelper
      • NetFramework
      • NewtonsoftExtensions
      • NotReadyException
      • ProcessExtensions
      • ProgramEntrypoint
      • ProgramEntrypointAsync
      • ProgramExitException
      • ProgramRunner
      • RandomExtensions
      • ReflectionExtensions
      • SemanticVersion
      • ServiceContainer
      • StaticZipOptions
      • StringBuilderExtensions
      • StringExtensions
      • Stub
      • Stub.Value
      • TaskExtensions
      • TimeSpanExtensions
      • ToolException
      • TriState
      • WeakEventController
      • WindowsEdition
      • WindowsFeatureStatus
      • YamlDotNetExtensions
    • Neon.Cryptography
      • AesCipher
      • CryptoExtensions
      • CryptoHelper
      • NeonVault
      • Wildcard
    • Neon.Csv
      • CsvReader
      • CsvTableReader
      • CsvTableWriter
      • CsvWriter
    • Neon.Data
      • DateTimeJsonConverter
      • DateTimeOffsetJsonConverter
      • IEnhancedJsonConverter
      • IGeneratedServiceClient
      • IPersistableType
      • IPersistableType<T>
      • IRoundtripData
      • IntegerEnumConverter<TEnum>
      • NotifyPropertyChanged
      • RoundtripDataFactory
      • RoundtripDataHelper
      • TimeSpanJsonConverter
      • VersionJsonConverter
    • Neon.Deployment
      • AwsCli
      • DeploymentException
      • DeploymentHelper
      • DownloadManifest
      • DownloadPart
      • DownloadProgressDelegate
      • DownloadProgressType
      • GitHub
      • GitHubActionsApi
      • GitHubPackage
      • GitHubPackageApi
      • GitHubPackageType
      • GitHubPackageVersion
      • GitHubPackageVisibility
      • GitHubReleaseApi
      • GitHubRepoPath
      • GitHubTagApi
      • IProfileClient
      • IProfileRequest
      • IProfileResponse
      • MaintainerProfile
      • NotifyClient
      • OnePassword
      • OnePasswordException
      • ProfileException
      • ProfileHandlerResult
      • ProfileRequest
      • ProfileResponse
      • ProfileServer
      • ProfileStatus
      • XenServer
    • Neon.Deployment.CodeSigning
      • AzureProfile
      • CodeSigner
      • UsbTokenProfile
    • Neon.Diagnostics
      • AssertException
      • ConfigExtensions
      • ConsoleJsonLogExporter
      • ConsoleJsonLogExporterOptions
      • ConsoleTextLogExporter
      • ConsoleTextLogExporterOptions
      • ExceptionInfo
      • FileLogExporter
      • FileLogExporterFormat
      • FileLogExporterOptions
      • LogAsTraceProcessor
      • LogAsTraceProcessorOptions
      • LogAttributeNames
      • LogAttributes
      • LogEvent
      • LogEventInterceptor
      • LoggerExtensions
      • NullLogger
      • TelemetryHub
      • TelemetrySpanEventNames
      • TelemetrySpanExtensions
    • Neon.Docker
      • DockerClient
      • DockerNetwork
      • DockerNetworkContainer
      • DockerNetworkIpam
      • DockerNode
      • DockerNodeManagerStatus
      • DockerResponse
      • DockerSettings
      • DockerVolume
      • NetworkCreateResponse
      • ServiceBindOptions
      • ServiceConfig
      • ServiceContainerSpec
      • ServiceCredentialSpec
      • ServiceDetails
      • ServiceDiscreteResourceSpec
      • ServiceDnsConfig
      • ServiceEndpoint
      • ServiceEndpointMode
      • ServiceEndpointPortConfig
      • ServiceEndpointSpec
      • ServiceFile
      • ServiceGenericResources
      • ServiceGlobalSchedulingMode
      • ServiceHealthCheck
      • ServiceIsolationMode
      • ServiceListResponse
      • ServiceLogDriver
      • ServiceMode
      • ServiceMount
      • ServiceMountBindPropagation
      • ServiceMountConsistency
      • ServiceMountType
      • ServiceNamedResourceSpec
      • ServiceNetwork
      • ServicePlacement
      • ServicePlacementPreferences
      • ServicePlacementSpreadSettings
      • ServicePlatform
      • ServicePortMode
      • ServicePortProtocol
      • ServicePrivileges
      • ServiceReplicatedSchedulingMode
      • ServiceResourceSettings
      • ServiceResources
      • ServiceRestartCondition
      • ServiceRestartPolicy
      • ServiceRollbackConfig
      • ServiceRollbackFailureAction
      • ServiceRollbackOrder
      • ServiceSELinuxContext
      • ServiceSchedulingMode
      • ServiceSecret
      • ServiceSpec
      • ServiceTaskTemplate
      • ServiceTmpfsOptions
      • ServiceUpdateConfig
      • ServiceUpdateFailureAction
      • ServiceUpdateOrder
      • ServiceUpdateState
      • ServiceUpdateStatus
      • ServiceVersion
      • ServiceVirtualIP
      • ServiceVolumeDriverConfig
      • ServiceVolumeOptions
      • VolumeListResponse
    • Neon.GitHub
      • GitExtensions
      • GitHubCredentials
      • GitHubRepo
      • LocalRepoApi
      • NoLocalRepositoryException
      • RemoteRepoApi
      • RemoteRepoBranchApi
      • RemoteRepoIssueApi
      • RemoteRepoIssueCommentApi
      • RemoteRepoPath
      • RemoteRepoReleaseApi
      • RemoteRepoTagApi
    • Neon.HyperV
      • HyperVClient
      • HyperVDriverType
      • HyperVException
      • NetAdapter
      • VirtualDrive
      • VirtualIPAddress
      • VirtualMachine
      • VirtualMachineNetworkAdapter
      • VirtualMachineState
      • VirtualNat
      • VirtualSwitch
      • VirtualSwitchType
    • Neon.IO
      • BlockStream
      • FixedLengthStream
      • IStaticDirectory
      • IStaticFile
      • LineEnding
      • LinuxPath
      • LinuxPermissions
      • PreprocessReader
      • RelayStream
      • StaticDirectoryBase
      • StaticFileBase
      • SubStream
      • TempFile
      • TempFolder
    • Neon.JsonConverters
      • JsonDateTimeConverter
      • JsonGenericConverter<T>
      • JsonNullableDateTimeConverter
    • Neon.ModelGen
      • ActionResult<T>
      • ApiVersion
      • ApiVersionAttribute
      • BodyStreamAttribute
      • ControllerValidationAttribute
      • DataModelAttribute
      • EnumMember
      • FromBodyAttribute
      • FromHeaderAttribute
      • FromQueryAttribute
      • FromRouteAttribute
      • GeneratedClientAttribute
      • GeneratedMethodAttribute
      • GeneratedParamAttribute
      • HashSourceAttribute
      • HttpAttribute
      • HttpDeleteAttribute
      • HttpGetAttribute
      • HttpHeadAttribute
      • HttpOptionsAttribute
      • HttpPatchAttribute
      • HttpPostAttribute
      • HttpPutAttribute
      • IActionResult
      • ModelGenerator
      • ModelGeneratorOutput
      • ModelGeneratorSettings
      • NoCodeGenAttribute
      • NoControllerValidationAttribute
      • PassAs
      • PersistableAttribute
      • PersistableKeyAttribute
      • RouteAttribute
      • ServiceModelAttribute
      • TargetAttribute
      • UxFrameworks
    • Neon.Net
      • HttpApiException
      • HttpException
      • JsonClient
      • JsonClientPayload
      • JsonResponse
      • Jwt
      • LocalHostSection
      • NetConst
      • NetHelper
      • NetworkCidr
      • NetworkConfiguration
      • NetworkException
      • NetworkPorts
      • Pinger
      • ReachableHost
      • ReachableHostMode
      • StreamDocument
    • Neon.Postgres
      • ConnectionExtensions
      • DatabaseStatus
      • PreparedCommand
      • ReaderAsyncEnumerator
      • ReaderEnumerator
      • ReaderExtensions
      • SchemaManager
      • SchemaManagerException
      • SchemaStatus
    • Neon.Retry
      • ExponentialRetryPolicy
      • IRetryPolicy
      • LinearRetryPolicy
      • NoRetryPolicy
      • RetryPolicy
      • RetryPolicyBase
      • RetryTransientArgs
      • TransientDetector
      • TransientException
    • Neon.Roslyn
      • DisplayFormat
      • DocumentationComment
      • DocumentationItem
      • MetadataLoadContext
      • RoslynAssembly
      • RoslynConstructorInfo
      • RoslynCustomAttributeData
      • RoslynExtensions
      • RoslynFieldInfo
      • RoslynMethodInfo
      • RoslynParameterInfo
      • RoslynPropertyInfo
      • RoslynType
      • SharedUtilities
    • Neon.Roslyn.Xunit
      • AdditionalSourceText
      • CompilationOptions
      • CompilationOptionsProvider
      • TestCompilation
      • TestCompilationAssertions
      • TestCompilationBuilder
      • TestCompilationBuilderExtensions
      • TestCompilationExtensions
    • Neon.SSH
      • CommandBundle
      • CommandFile
      • CommandResponse
      • HostFolders
      • IBashCommandFormatter
      • ILinuxSshProxy
      • LinuxDiskInfo
      • LinuxDiskPartition
      • LinuxSshProxy
      • LinuxSshProxy<TMetadata>
      • NamespaceDoc
      • RemoteCommandException
      • RunOptions
      • SshCredentials
      • SshExtensions
      • SshProxyException
    • Neon.Service
      • LogMetricsProcessor
      • MetricsMode
      • MetricsOptions
      • NeonService
      • NeonServiceOptions
      • NeonServiceStatus
      • OtelConfigExtensions
      • OtlpCollectorChecker
      • ProcessTerminator
      • ServiceApiContact
      • ServiceApiInfo
      • ServiceApiLicense
      • ServiceDependencies
      • ServiceDescription
      • ServiceEndpoint
      • ServiceEndpointProtocol
      • ServiceEndpoints
      • ServiceMap
    • Neon.SignalR
      • DependencyInjectionExtensions
      • DnsCache
      • GroupAction
      • GroupCommand
      • IDnsCache
      • Invocation
      • NatsHubLifetimeManager<THub>
      • ProxyConfig
      • ServiceCollectionExtensions
      • ServiceDiscovey
      • SignalrProxyMiddleware
      • SignalrProxyMiddlewareExtensions
      • TracerProviderBuilderExtensions
    • Neon.Tailwind
      • ClickOffEventHandler
      • ComponentEventArgs<TSender>
      • ComponentEventArgs<TSender, TEventArgs>
      • DisclosureState
      • EventHandlerComponentBase<TComponent>
      • HeadlessButton
      • HeadlessDialog
      • HeadlessDialogPanel
      • HeadlessDisclosure
      • HeadlessDisclosureButton
      • HeadlessDisclosurePanel
      • HeadlessListboxButton<TValue>
      • HeadlessListboxLabel<TValue>
      • HeadlessListboxOption<TValue>
      • HeadlessListboxOptions<TValue>
      • HeadlessListbox<TValue>
      • HeadlessMenu
      • HeadlessMenuButton
      • HeadlessMenuItem
      • HeadlessMenuItems
      • HeadlessSwitch
      • HeadlessSwitchGroup
      • HeadlessSwitchLabel
      • IPortalBinder
      • KeyDownEventHandler
      • KeyboardKey
      • ListboxFocus
      • ListboxState
      • MenuFocus
      • MenuState
      • Portal
      • PortalBinder
      • PortalContent
      • SearchAssistant
      • TailwindExtensions
      • Transition
      • TransitionGroup
      • TransitionState
    • Neon.Tasks
      • Async
      • AsyncAutoResetEvent
      • AsyncManualResetEvent
      • AsyncMutex
      • AsyncPeriodicTask
      • AsyncReaderWriterLock
      • AsyncReentrantMutex
      • AsyncTimer
      • IAsyncFuture
      • IAsyncFuture<T>
      • NonDisposableTask
      • NonDisposableTask<T>
      • SyncContext
      • SyncContextMode
    • Neon.Temporal
      • ActivityHelper
      • ActivityLogEnricher
      • TemporalEnricherTagNames
      • WorkflowLogEnricher
    • Neon.Time
      • GatedTimer
      • GoDuration
      • PolledTimer
      • RecurringTimer
      • RecurringTimerType
      • SysTime
      • TimeOfDay
    • Neon.WSL
      • Wsl2Proxy
    • Neon.Web
      • AesProtector
      • DataProtectionExtensions
      • NeonController
      • NeonControllerBase
      • RoundTripJsonInputFormatter
      • RoundTripJsonOutputFormatter
      • TracerProviderBuilderExtensions
      • WebHelper
    • Neon.WinTTY
      • ConsoleTTY
    • Neon.Windows
      • MEMORYSTATUSEX
      • PowerShellException
      • Win32
    • Neon.XenServer
      • IXenClient
      • XenClient
      • XenClient.MachineOperations
      • XenClient.StorageOperations
      • XenClient.TemplateOperations
      • XenException
      • XenHostInfo
      • XenObject
      • XenResponse
      • XenStorageRepository
      • XenTempIso
      • XenTemplate
      • XenVirtualDisk
      • XenVirtualMachine
      • XenVmPowerState
    • Neon.Xunit
      • AnsiblePlayResults
      • AnsiblePlayer
      • AnsibleTaskResult
      • AspNetFixture
      • BasicFixture
      • CodeFixture
      • CollectionComparer<T>
      • ComposedFixture
      • ContainerFixture
      • ContainerLimits
      • DockerComposeFixture
      • DockerFixture
      • DockerFixture.ConfigInfo
      • DockerFixture.ContainerInfo
      • DockerFixture.NetworkInfo
      • DockerFixture.SecretInfo
      • DockerFixture.ServiceInfo
      • DockerFixture.StackDefinition
      • DockerFixture.StackInfo
      • DockerFixture.StackService
      • EnvironmentFixture
      • HostsFixture
      • ITestFixture
      • IncompatibleServiceException
      • MaintainerFactAttribute
      • MaintainerTheoryAttribute
      • MockHttpServer
      • MockHttpServerExtensions
      • NatsFixture
      • NatsStreamingFixture
      • NeonServiceFixture<TService>
      • PlatformFactAttribute
      • RepeatAttribute
      • TargetPlatforms
      • TestArea
      • TestCollection
      • TestContext
      • TestFixture
      • TestFixtureStatus
      • TestHelper
      • TestHttpClient
      • TestOutputWriter
      • TestTrait
      • XunitExtensions
    • Neon.Xunit.YugaByte
      • YugaByteFixture
    • Neon.YugaByte
      • YugaByteHelper

    Class LinuxSshProxy<TMetadata>

    Uses a SSH/SCP connection to provide access to Linux machines to access files, run commands, etc. This extends LinuxSshProxy by adding the Metadata property with a generic type.

    note

    IMPORTANT: We use this class to manage Ubuntu Linux machines. This will likely work for Debian and other Debian based distros but other distros like Alpine and Red Hat may have problems or may not work at all.

    Inheritance
    object
    LinuxSshProxy
    LinuxSshProxy<TMetadata>
    Inherited Members
    LinuxSshProxy.SshProxyInitPath
    LinuxSshProxy.credentials
    LinuxSshProxy.logWriter
    LinuxSshProxy.Dispose()
    LinuxSshProxy.CloneTo(LinuxSshProxy)
    LinuxSshProxy.OsName
    LinuxSshProxy.OsVersion
    LinuxSshProxy.KernelVersion
    LinuxSshProxy.KernelRelease
    LinuxSshProxy.Name
    LinuxSshProxy.Address
    LinuxSshProxy.SshPort
    LinuxSshProxy.ConnectTimeout
    LinuxSshProxy.FileTimeout
    LinuxSshProxy.RetryCount
    LinuxSshProxy.DefaultRunOptions
    LinuxSshProxy.RemotePath
    LinuxSshProxy.Username
    LinuxSshProxy.Status
    LinuxSshProxy.IsInvolved
    LinuxSshProxy.IsConfiguring
    LinuxSshProxy.IsReady
    LinuxSshProxy.IsFaulted
    LinuxSshProxy.HomeFolderPath
    LinuxSshProxy.DownloadFolderPath
    LinuxSshProxy.UploadFolderPath
    LinuxSshProxy.Disconnect()
    LinuxSshProxy.UpdateCredentials(SshCredentials)
    LinuxSshProxy.GetAuthenticationMethod(SshCredentials)
    LinuxSshProxy.DisableSudoPrompt(string)
    LinuxSshProxy.Shutdown()
    LinuxSshProxy.Reboot(bool)
    LinuxSshProxy.UpdateRootCertificates()
    LinuxSshProxy.PatchLinux()
    LinuxSshProxy.UpgradeLinuxDistribution()
    LinuxSshProxy.Log(string)
    LinuxSshProxy.LogLine(string)
    LinuxSshProxy.LogFlush()
    LinuxSshProxy.LogException(Exception)
    LinuxSshProxy.LogException(string, Exception)
    LinuxSshProxy.Fault(string)
    LinuxSshProxy.Connect(TimeSpan)
    LinuxSshProxy.WaitForBoot(TimeSpan?)
    LinuxSshProxy.CloneSshClient()
    LinuxSshProxy.CloneScpClient()
    LinuxSshProxy.RemoveFile(string)
    LinuxSshProxy.Download(string, Stream)
    LinuxSshProxy.DownloadBytes(string)
    LinuxSshProxy.DownloadText(string)
    LinuxSshProxy.DirectoryExists(string)
    LinuxSshProxy.DeleteDirectory(string)
    LinuxSshProxy.FileExists(string)
    LinuxSshProxy.DeleteFile(string)
    LinuxSshProxy.Upload(string, Stream, string, string, bool)
    LinuxSshProxy.UploadBytes(string, byte[])
    LinuxSshProxy.UploadText(string, Stream, int, Encoding, Encoding, string, string)
    LinuxSshProxy.UploadText(string, string, int, Encoding, string, string)
    LinuxSshProxy.UploadText(string, StringBuilder, int, Encoding, string, string)
    LinuxSshProxy.Download(string, string)
    LinuxSshProxy.RunCommand(string, params object[])
    LinuxSshProxy.RunCommand(string, RunOptions, params object[])
    LinuxSshProxy.RunCommand(CommandBundle, RunOptions)
    LinuxSshProxy.SudoCommand(string, params object[])
    LinuxSshProxy.SudoCommand(string, RunOptions, params object[])
    LinuxSshProxy.SudoCommandAsUser(string, string, params object[])
    LinuxSshProxy.SudoCommandAsUser(string, string, RunOptions, params object[])
    LinuxSshProxy.SudoCommand(CommandBundle, RunOptions)
    LinuxSshProxy.CreateShell()
    LinuxSshProxy.CreateSudoShell()
    LinuxSshProxy.GetNetworkInterface(IPAddress)
    LinuxSshProxy.GetTimeUtc()
    LinuxSshProxy.Clean(bool, bool)
    LinuxSshProxy.ListDisks(bool)
    LinuxSshProxy.ListUnpartitionedDisks()
    LinuxSshProxy.ListPartitionedDisks()
    LinuxSshProxy.KubectlApply(string, RunOptions)
    LinuxSshProxy.KubeCtlApply(StringBuilder, RunOptions)
    LinuxSshProxy.GetNeonInitStatus()
    LinuxSshProxy.SetNeonInitStatus(bool, bool)
    LinuxSshProxy.SetPassword(string, string)
    LinuxSshProxy.ToString()
    Namespace: Neon.SSH
    Assembly: Neon.SSH.dll
    Syntax
    public class LinuxSshProxy<TMetadata> : LinuxSshProxy where TMetadata : class
    Type Parameters
    Name Description
    TMetadata

    Defines the metadata type the application wishes to associate with the server. You may specify object when no additional metadata is required.

    Remarks

    Construct an instance to connect to a specific cluster node. You may specify TMetadata to associate application specific information or state with the instance.

    This class includes methods to invoke Linux commands on the node,

    Call Dispose() or Disconnect() to close the connection.

    note

    You can use Clone() to make a copy of a proxy that can be used to perform parallel operations against the same machine.

    Constructors

    LinuxSshProxy(string, IPAddress, SshCredentials, int, TextWriter)

    Constructs a LinuxSshProxy<TMetadata>.

    Declaration
    public LinuxSshProxy(string name, IPAddress address, SshCredentials credentials, int port = 22, TextWriter logWriter = null)
    Parameters
    Type Name Description
    string name

    The display name for the server.

    IPAddress address

    The private cluster IP address for the server.

    SshCredentials credentials

    The credentials to be used for establishing SSH connections.

    int port

    Optionally overrides the standard SSH port (22).

    TextWriter logWriter

    The optional TextWriter where operation logs will be written.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if name or if credentials is null.

    Properties

    Metadata

    Applications may use this to associate metadata with the instance.

    Declaration
    public TMetadata Metadata { get; set; }
    Property Value
    Type Description
    TMetadata

    Methods

    Clone()

    Returns a clone of the SSH proxy. This can be useful for situations where you need to be able to perform multiple SSH/SCP operations against the same machine in parallel.

    Declaration
    public LinuxSshProxy<TMetadata> Clone()
    Returns
    Type Description
    LinuxSshProxy<TMetadata>

    The cloned LinuxSshProxy<TMetadata>.

    CloneTo(LinuxSshProxy<TMetadata>)

    Used by derived classes to copy the base class state to a new instance as well as configure the new connection's SSH and SCP clients.

    Declaration
    protected void CloneTo(LinuxSshProxy<TMetadata> target)
    Parameters
    Type Name Description
    LinuxSshProxy<TMetadata> target

    The target proxy.

    Dispose(bool)

    Releases all associated resources (e.g. any open server connections).

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Pass true if we're disposing, false if we're finalizing.

    Overrides
    LinuxSshProxy.Dispose(bool)
    In this article
    Back to top © Copyright 2005-2023 by NEONFORGE LLC