Skip to content

configure sshd on vms

Lokman Rahmani edited this page Dec 26, 2017 · 1 revision

Configure SSH servers on the VMs to be able transfer files from/to the host

  1. Open /etc/ssh/sshd_config file
vi /etc/ssh/sshd_config
  1. Make sure that
  • PermitRootLogin yes is not commented
  • PasswordAuthetication yes is not commented
  • ChallengeResponseAuthentication yes is not commented
  • AllowUsers is commented
  1. Save, quit and restart sshd
systemctl restart sshd.service
  1. In VM network configuration choose the Host-Only Adapter, then run dhclient to get an IP address
dhclient enp0s3 -v
  1. Now you can ssh or scp from the host machine as root using the IP address attributed by DHCP
ssh -v root@192.168.56.102 # for example