A
A
Adel Khalitov2019-11-02 02:30:19
linux
Adel Khalitov, 2019-11-02 02:30:19

Why is there an error when mounting a remote fs via sshfs?

sshfs -odebug,sshfs_debug,loglevel=debug [email protected]:/ /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> <[email protected]> <-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: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] 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: [email protected] 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: [email protected] 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.
[email protected]: Permission denied (publickey).
read: Connection reset by peer

sftp settings
Match group importfoto
    ChrootDirectory /home/%u/chroot
    PasswordAuthentication no
RSAAuthentication yes
PubkeyAuthentication yes
    AllowTCPForwarding no
    X11Forwarding no
    ForceCommand internal-sftp -u 0002

It connects by password, there is no certificate with the certificate, what's the matter?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rionnagel, 2019-11-02
@rionnagel

From wrong rights, to the complete absence of a key.

D
Denis Michurin, 2019-11-02
@denistu10

[email protected]: Permission denied (publickey).

It is written...
Most likely your key is not added for the DEV user on the myserver server
Also check the user on DEV for rights to the directory/home/DEV/.ssh

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question