Fetch the repository succeeded.
This action will force synchronization from chuanjiao10/kasini3000_agent_linux, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
#
if grep -Eq 'buster' /etc/issue || grep -Eq 'buster' /etc/*-release
then
echo 'linux is debian10'
if [ -h /usr/bin/pwsh ]
then
echo 'powershell installed on debian10'
if grep -Eq 'powershell' /etc/ssh/sshd_config
then
echo 'powershell_sshd_good'
exit 0
else
echo '' >> /etc/ssh/sshd_config
echo 'Subsystem powershell /usr/bin/pwsh -sshs -NoLogo -NoProfile' >> /etc/ssh/sshd_config
echo 'UseDNS no' >> /etc/ssh/sshd_config
echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
systemctl restart sshd.service
echo 'powershell_sshd_fixed'
exit 0
fi
else
echo 'installing powershell now'
apt-get update
apt-get install -y curl gnupg apt-transport-https sudo
cd /tmp
wget https://packages.microsoft.com/keys/microsoft.asc
apt-key add /tmp/microsoft.asc
echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster main" > /etc/apt/sources.list.d/microsoft.list
sudo apt-get update
sudo apt-get remove -y powershell
sudo apt-get install -y powershell
if [ $? -ne 0 ]
then
echo 'install fall'
exit 3
else
echo 'install powershell sucess'
fi
if grep -Eq 'powershell' /etc/ssh/sshd_config
then
echo 'powershell_sshd_good'
exit 0
else
echo '' >> /etc/ssh/sshd_config
echo 'Subsystem powershell /usr/bin/pwsh -sshs -NoLogo -NoProfile' >> /etc/ssh/sshd_config
echo 'UseDNS no' >> /etc/ssh/sshd_config
echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
systemctl restart sshd.service
echo 'powershell_sshd_fixed'
exit 0
fi
fi
else
echo 'linux not debian10'
exit 2
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。