Kali Linux 中 ssh xrdp 配置


版本:Kali Linux 2020.02
ssh配置:
编辑:vi /etc/ssh/sshd_config (注意不是ssh_config)

#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

将 # 号 去掉,重启ssh

xrdp下载:
apt-get install xrdp
apt-get install xfce4
xrdp配置:vi /etc/xrdp/startwm.sh
添加:
echo "xfce4-session" >~/.xsession
在以下位置

if test -r /etc/profile; then
. /etc/profile
fi

echo "xfce4-session" >~/.xsession

test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession

设置开机启动
update-rc.d ssh enable

update-rc.d xrdp enable

用putty测试ssh是否成功
用windows自带的mstsc(远程桌面)测试xrdp是否成功