Kali linux 开启ssh

2020-09-22  本文已影响0人  Assassin_1397

参考 https://www.lmgsecurity.com/enable-start-ssh-kali-linux/

install_ssh.sh

#! /bin/bash
sudo apt install openssh-server
mkdir /etc/ssh/default_keys # 备份老的ssh keys
mv /etc/ssh/ssh_host_* /etc/ssh/default_keys/ 
sudo dpkg-reconfigure openssh-server # 生成新的ssh keys
sudo nano /etc/ssh/sshd_config
# 设置 PubkeyAuthentication yes
sudo systemctl enable ssh #添加开机自启动
sudo systemctl status ssh # 查看状态

虚拟机无法远程,设置虚拟机的网络连接为bridge

image-20200922233436105

ssh远程上传下载文件

参照scp用法

https://www.cyberpratibha.com/how-to-use-scp-command-in-linux/

上一篇 下一篇

猜你喜欢

热点阅读