adelkhalitov
@adelkhalitov
>

Почему ошибка при маунте удаленной fs через sshfs?

sshfs -odebug,sshfs_debug,loglevel=debug DEV@myserver:/ /media/DEV 
SSHFS version 2.10.0
FUSE library version: 2.9.9
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-ologlevel=debug> <-2> <DEV@myserver> <-s> <sftp>
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to myserver [myserver] port 22.
debug1: Connection established.
debug1: identity file /home/adel/.ssh/id_rsa type 0
debug1: identity file /home/adel/.ssh/id_rsa-cert type -1
debug1: identity file /home/adel/.ssh/id_dsa type -1
debug1: identity file /home/adel/.ssh/id_dsa-cert type -1
debug1: identity file /home/adel/.ssh/id_ecdsa type -1
debug1: identity file /home/adel/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/adel/.ssh/id_ed25519 type -1
debug1: identity file /home/adel/.ssh/id_ed25519-cert type -1
debug1: identity file /home/adel/.ssh/id_xmss type -1
debug1: identity file /home/adel/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.0p1 Ubuntu-6build1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.8
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.8 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug1: Authenticating to myserver:22 as 'DEV'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:....
The authenticity of host 'myserver (myserver)' can't be established.
ECDSA key fingerprint is SHA256:.....
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'myserver' (ECDSA) to the list of known hosts.
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /home/adel/.ssh/id_rsa RSA SHA256:... agent
debug1: Will attempt key: adelkhalitov1@gmail.com RSA SHA256:... agent
debug1: Will attempt key: /home/adel/.ssh/id_dsa 
debug1: Will attempt key: /home/adel/.ssh/id_ecdsa 
debug1: Will attempt key: /home/adel/.ssh/id_ed25519 
debug1: Will attempt key: /home/adel/.ssh/id_xmss 
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/adel/.ssh/id_rsa RSA SHA256:... agent
debug1: Authentications that can continue: publickey
debug1: Offering public key: adelkhalitov1@gmail.com RSA SHA256:.. agent
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/adel/.ssh/id_dsa
debug1: Trying private key: /home/adel/.ssh/id_ecdsa
debug1: Trying private key: /home/adel/.ssh/id_ed25519
debug1: Trying private key: /home/adel/.ssh/id_xmss
debug1: No more authentication methods to try.
DEV@myserver: Permission denied (publickey).
read: Connection reset by peer


Настройки для сфтп
Match group importfoto
    ChrootDirectory /home/%u/chroot
    PasswordAuthentication no
RSAAuthentication yes
PubkeyAuthentication yes
    AllowTCPForwarding no
    X11Forwarding no
    ForceCommand internal-sftp -u 0002


По паролю конектится, с сертификатом нет что за дела?
  • Вопрос задан
  • 221 просмотр
Пригласить эксперта
Ответы на вопрос 2
@rionnagel
ковырятель
От неправильных прав, до полного отсутствия ключа.
Ответ написан
Комментировать
denistu10
@denistu10
Linux System Administrator/SRE Engineer
DEV@myserver: Permission denied (publickey).

Написано же...

Скорее всего ваш ключ не добавлен для пользователя DEV на сервере myserver

Так же проверить пользователя на DEV на права в директорию /home/DEV/.ssh
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы