protected override void Negotiate() { SSHConnectionParameter con = new SSHConnectionParameter(_host, _port, SSHProtocol.SSH2, _profile.AuthType, _profile.SSHAccount, _password); con.IdentityFile = _profile.PrivateKeyFile; con.PreferableCipherAlgorithms = SSHUtil.ParseCipherAlgorithm(Env.Options.CipherAlgorithmOrder); con.PreferableHostKeyAlgorithms = SSHUtil.ParsePublicKeyAlgorithm(Env.Options.HostKeyAlgorithmOrder); con.WindowSize = Env.Options.SSHWindowSize; con.CheckMACError = Env.Options.SSHCheckMAC; if (_keycheck != null) con.VerifySSHHostKey = this.CheckKey; _result = ChannelFactory.Create(_profile); ISSHConnection c = SSHConnection.Connect( _socket, con, sshconn => _result, null); if (c != null) { /* if(_profile.ProtocolType==ProtocolType.Udp) OpenUdpDestination(c, (UdpChannelFactory)_result); else */ _result.FixConnection(c); if (Env.Options.RetainsPassphrase) _profile.Passphrase = _password; //接続成功時のみセット } else { throw new IOException(Env.Strings.GetString("Message.ConnectionManager.ConnectionCancelled")); } }
//ISocketWithTimeoutClient これらはこのウィンドウとは別のスレッドで実行されるので慎重に public void SuccessfullyExit(object result) { _result = (ChannelFactory)result; Debug.Assert(InvokeRequired); this.Invoke(new ExitDelegate(SuccessfullyExitX)); }
protected override void Negotiate() { SSHConnectionParameter con = new SSHConnectionParameter(); con.Protocol = SSHProtocol.SSH2; con.UserName = _profile.SSHAccount; con.Password = _password; con.AuthenticationType = _profile.AuthType; con.IdentityFile = _profile.PrivateKeyFile; con.PreferableCipherAlgorithms = SSHUtil.ParseCipherAlgorithm(Env.Options.CipherAlgorithmOrder); con.PreferableHostKeyAlgorithms = SSHUtil.ParsePublicKeyAlgorithm(Env.Options.HostKeyAlgorithmOrder); con.WindowSize = Env.Options.SSHWindowSize; con.CheckMACError = Env.Options.SSHCheckMAC; if (_keycheck != null) con.KeyCheck += new HostKeyCheckCallback(this.CheckKey); _result = ChannelFactory.Create(_profile); SSHConnection c = SSHConnection.Connect(con, _result, _socket); c.AutoDisconnect = false; if (c != null) { /* if(_profile.ProtocolType==ProtocolType.Udp) OpenUdpDestination(c, (UdpChannelFactory)_result); else */ _result.FixConnection(c); if (Env.Options.RetainsPassphrase) _profile.Passphrase = _password; //接続成功時のみセット } else { throw new IOException(Env.Strings.GetString("Message.ConnectionManager.ConnectionCancelled")); } }
//ISocketWithTimeoutClient �����͂��̃E�B���h�E�Ƃ͕ʂ̃X���b�h�Ŏ��s�����̂ŐT�d�� public void SuccessfullyExit(object result) { _result = (ChannelFactory)result; //_result.SetServerInfo(((TCPTerminalParam)_result.Param).Host, swt.IPAddress); Win32.SendMessage(_savedHWND, WM_ASYNCCONNECT, IntPtr.Zero, new IntPtr(1)); }