前言:
为了在Kali上远程连接Windows系统的服务器我们需要安装两个工具,rdesktop和tsclient。另外,我们从主机服务商那里购买的Windows操作系统的服务器都是默认开启了远程连接的,如果我们要在局域网里连接桌面版的Windows系统一般还需要开启并配置好远程桌面。
操作步骤:
安装rdesktop,输入命令:
apt-get install rdesktop
安装tsclient,输入命令:
apt-get install tsclient
输入:
rdesktop ip:端口号
或者输入:
rdesktop ip
即可打开Windows服务器的登录页面,默认的登录用户名是“root”,可以根据实际情况修改。
命令“rdesktop”后面可以跟的几个常用参数及功能如下:
-f //全屏显示(想退出全屏则使用组合键“Ctrl+Alt+Enter”)
-a [x] //指定显示的颜色深度。
/*注:一般可以在网速不够好的情况下可以指定为“-a 8”(此时显示效果基本为黑白蓝),网速较好时指定为“-a 16”(此时的显示效果是彩色的),默认的颜色深度是24(“默认的颜色深度是24”属于推测,因为,我在不指定颜色深度的情况下,即不使用“-a [x]”参数时连接Windows Server 2003服务器时会产生警示:“WARNING: Remote desktop does not support colour depth 24; falling back to 16”)*/
-g [x*x] //指定远程桌面在本地显示窗口的大小,如“-g 600*800”.
-u name //登录用户的用户名
-p password //登录密码
-r sound:local //将远程主机的声音重定向到本地。
注:
1.rdesktop是一个基于命令行的工具,而tsclient则可以提供图形化界面。(在终端输入tsclient会显示“bash: tsclient: command not found”,因此推测tsclient应该只是作为rdesktop的一个扩展插件存在)。
2.上述工具也可以在其他Linux平台上使用,如CentOS和Ubuntu.
附:rdesktop的帮助信息(终端输入“rdesktop”可以查看)
rdesktop: A Remote Desktop Protocol client.
Version 1.8.3. Copyright (C) 1999-2011 Matthew Chapman et al.
See http://www.rdesktop.org/ for more information.
Usage: rdesktop [options] server[:port]
-u: user name
-d: domain
-s: shell / seamless application to start remotly
-c: working directory
-p: password (- to prompt)
-n: client hostname
-k: keyboard layout on server (en-us, de, sv, etc.)
-g: desktop geometry (WxH)
-i: enables smartcard authentication, password is used as pin
-f: full-screen mode
-b: force bitmap updates
-L: local codepage
-A: path to SeamlessRDP shell, this enables SeamlessRDP mode
-B: use BackingStore of X-server (if available)
-e: disable encryption (French TS)
-E: disable encryption from client to server
-m: do not send motion events
-C: use private colour map
-D: hide window manager decorations
-K: keep window manager key bindings
-S: caption button size (single application mode)
-T: window title
-t: disable use of remote ctrl
-N: enable numlock syncronization
-X: embed into another window with a given id.
-a: connection colour depth
-z: enable rdp compression
-x: RDP5 experience (m[odem 28.8], b[roadband], l[an] or hex nr.)
-P: use persistent bitmap caching
-r: enable specified device redirection (this flag can be repeated)
'-r comport:COM1=/dev/ttyS0': enable serial redirection of /dev/ttyS0 to COM1
or COM1=/dev/ttyS0,COM2=/dev/ttyS1
'-r disk:floppy=/mnt/floppy': enable redirection of /mnt/floppy to 'floppy' share
or 'floppy=/mnt/floppy,cdrom=/mnt/cdrom'
'-r clientname=<client name>': Set the client name displayed
for redirected disks
'-r lptport:LPT1=/dev/lp0': enable parallel redirection of /dev/lp0 to LPT1
or LPT1=/dev/lp0,LPT2=/dev/lp1
'-r printer:mydeskjet': enable printer redirection
or mydeskjet="HP LaserJet IIIP" to enter server driver as well
'-r sound:[local[:driver[:device]]|off|remote]': enable sound redirection
remote would leave sound on server
available drivers for 'local':
alsa: ALSA output driver, default device: default
'-r clipboard:[off|PRIMARYCLIPBOARD|CLIPBOARD]': enable clipboard
redirection.
'PRIMARYCLIPBOARD' looks at both PRIMARY and CLIPBOARD
when sending data to server.
'CLIPBOARD' looks at only CLIPBOARD.
'-r scard[:"Scard Name"="Alias Name[;Vendor Name]"[,...]]
example: -r scard:"eToken PRO 00 00"="AKS ifdh 0"
"eToken PRO 00 00" -> Device in Linux/Unix enviroment
"AKS ifdh 0" -> Device shown in Windows enviroment
example: -r scard:"eToken PRO 00 00"="AKS ifdh 0;AKS"
"eToken PRO 00 00" -> Device in Linux/Unix enviroment
"AKS ifdh 0" -> Device shown in Windows enviroment
"AKS" -> Device vendor name
-0: attach to console
-4: use RDP version 4
-5: use RDP version 5 (default)
-o: name=value: Adds an additional option to rdesktop.
sc-csp-name Specifies the Crypto Service Provider name which
is used to authenticate the user by smartcard
sc-container-name Specifies the container name, this is usally the username
sc-reader-name Smartcard reader name to use
sc-card-name Specifies the card name of the smartcard to use
end
更多内容请访问我的个人网站荒原之梦