[英]remote desktop connection from windows to linux using c#.net
在rdp的c#開發中,我們基本上使用MSTSCLib; 但是連接Linux這個DLL不支持。 因此,從Windows到C#應用程序中的linux,哪些dll必須用於rdp。
命名空間SampleRDC {公共局部類Form1:Form {公共Form1(){InitializeComponent(); }
private void button1_Click(object sender, EventArgs e)
{
try
{
rdp.Server = txtServer.Text;
rdp.UserName = txtUserName.Text;
IMsTscNonScriptable secured = (IMsTscNonScriptable)rdp.GetOcx();
secured.ClearTextPassword = txtPassword.Text;
rdp.Connect();
}
catch (Exception Ex)
{
MessageBox.Show("Error Connecting", "Error connecting to remote desktop " + txtServer.Text + " Error: " + Ex.Message,MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void button2_Click(object sender, EventArgs e)
{
try
{
// Check if connected before disconnecting
if (rdp.Connected.ToString() == "1")
rdp.Disconnect();
}
catch (Exception Ex)
{
MessageBox.Show("Error Disconnecting", "Error disconnecting from remote desktop " + txtServer.Text + " Error: " + Ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}
基於此程序,如何通過遠程桌面將Windows寫入linux
看一下Putty ,您不能從Windows將RDP放入Linux機器,而可以使用稱為SSH的協議,它沒有GUI,並且所有內容都是基於文本的。
RDP是Windows固有的。 如果您希望Linux充當RDP服務器,請訪問http://sourceforge.net/projects/xrdp/查看XRDP。
對於Linux,您可以使用SSH(Putty支持)。 另一個選擇是啟用大多數Linux發行版支持的VNC服務器。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.