public LibSshNetConnection(string host, string username, string password) { Session = new Session(); Session.SetOption(SshOption.Host, host); Session.SetOption(SshOption.Port, 22); Session.SetOption(SshOption.User, username); // Session.SetOption(SshOption.CiphersCS, "aes256-cbc"); Session.Connect(); Session.PasswordAuth(password); Pty = new Channel(Session); Pty.RequestPty("xterm", 160, 40); Pty.RequestShell(); stream = new LibSshNetStream(this); }
public void Connect(IStreamNotifier notifier, ConnectionSettings settings) { this.settings = settings; stream = notifier.Stream as ShellStream; var terminal = new XtermTerminal(notifier) { Size = new Terminal.Point(App.DefaultTerminalCols, App.DefaultTerminalRows), DefaultFont = new TerminalFont() { Foreground = TerminalColors.GetBasicColor(7) } }; terminal.StreamException += Terminal_StreamException; terminal.TitleChanged += (sender, e) => { Title = e.Title; }; Terminal = terminal; }
public LibSshNetStreamNotifier(TerminalControl terminal, LibSshNetStream stream) { this.terminal = terminal; Stream = stream; stream.DataReceived += Stream_DataReceived; }