/// <summary>
        /// If PlatformStadia is available we pass the gamelet's ip and port for an scp
        /// connection in pre-generated scp command (it includes the full path to scp executable
        /// and all other flags).
        /// </summary>
        /// <param name="debuggerUrl">Url for ConnectRemote.</param>
        /// <param name="targetIpAddress">Gamelet ip address.</param>
        /// <param name="targetPort">Gamelet port./</param>
        /// <returns>ConnectRemote url enriched with a
        /// configuration for scp.exe if applicable.</returns>
        string CreateConnectRemoteArgument(string debuggerUrl, string targetIpAddress,
                                           int targetPort)
        {
            if (!_stadiaPlatformAvailable)
            {
                return(debuggerUrl);
            }

            string executable           = Path.Combine(SDKUtil.GetSshPath(), YetiConstants.ScpWinExecutable);
            string sshKeyFilePath       = SDKUtil.GetSshKeyFilePath();
            string sshKnownHostFilePath = SDKUtil.GetSshKnownHostsFilePath();

            return
                ($"{debuggerUrl};\"{executable}\" -v -T -i \"{sshKeyFilePath}\" -F NUL -P " +
                 $"{targetPort} -oStrictHostKeyChecking=yes " +
                 $"-oUserKnownHostsFile=\"{sshKnownHostFilePath}\" cloudcast@{targetIpAddress}:");
        }
示例#2
0
 public SshKeyLoader(ManagedProcess.Factory managedProcessFactory)
     : this(managedProcessFactory, SDKUtil.GetSshKeyFilePath())
 {
 }