Rebex SSH server rejects a pseudo-terminal request if the requested number of rows or columns is less than 2 or greater than 999. To prevent the error, make sure to specify values within that range in SSH.NET. For example:
using (var client = new SshClient("test.rebex.net", "demo", "password"))
{
client.Connect();
using (var stream = client.CreateShellStream("xterm", 80, 25, 640, 400, 0x10000))
{
string response = stream.ReadLine();
Console.WriteLine($"Response: {response}");
}
}