91
Quand je veux un dossier partagé depuis une VM exécutée via KVM (je n'utilise jamais VirtualBox), je crée un montage via sshfs.
zypper in sshfs
Pour monter le dossier /home/toto/docs (présent sur la VM) dans le dossier /mnt de mon PC:
sshfs toto@IP_de_la_VM:/home/toto/docs /mnt
pour démonter:
fusermount -u /mnt
Bien entendu il faut avoir configuré correctement ssh.
100
Ce qu'il manque:
# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Ciphers and keying
#RekeyLimit default none
# Logging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin prohibit-password
StrictModes yes
MaxAuthTries 6
MaxSessions 10
PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
Les lignes non commentées (non préfixées d'un #) sont celles que j'ai modifiées chez moi. Avant de copier-coller, vérifie que ça correspond à ce que tu veux faire.
103
Salut,
Lorsque tu essayes de le démarrer, tu dois bien avoir un message d'erreur retourné. Poste le résultat de
systemctl status sshd
journalctl -xe
immédiatement après avoir essayer de le lancer.
Vérifie aussi que dans /etc/ssh tu as bien au minimum ces fichiers là:
ssh_config
sshd_config
ssh_host_dsa_key
ssh_host_dsa_key.pub
ssh_host_ecdsa_key
ssh_host_ecdsa_key.pub
ssh_host_ed25519_key
ssh_host_ed25519_key.pub
ssh_host_rsa_key
ssh_host_rsa_key.pub
As-tu modifié la configuration du démon ssh via /etc/ssh/sshd_config ? Si oui, poste nous le contenu de ce fichier.