Skip to content

Latest commit

 

History

History
34 lines (32 loc) · 677 Bytes

ssh_vm.md

File metadata and controls

34 lines (32 loc) · 677 Bytes

Activate ssh in master node

  1. Generate ssh key and set config
cd $HOME/.ssh/
ssh-keygen -t rsa
ssh-keygen -t ed25519
cat id_rsa.pub | xclip -sel clip
# Set config
nvim config
  1. Copy pub key to VM
# Paste the pub key
vim $HOME/.ssh/authorized_keys
# Set config
cat << EOF | sudo tee /etc/ssh/sshd_config
Port 22
PasswordAuthentication no
AllowAgentForwarding yes
ChallengeResponseAuthentication no
EOF
# Enable file config
# Set EnvironmentFile=-/etc/sysconfig/sshd
vim /usr/lib/systemd/system/sshd.service
# Restart sshd
systemctl restart sshd

nmap scan

sudo nmap -snP 192.168.0.1/24
sudo nmap -p1-65535 -sV -sS -T4 192.168.0.1/24