Mon Yunohost n'accepte pas le ssh

[folaht@Pjehrsohmehj ~]$ ssh -v admin@Yropeehn
OpenSSH_8.0p1, OpenSSL 1.1.1c  28 May 2019
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to yropeehn [192.168.178.24] port 22.
debug1: Connection established.
debug1: identity file /home/folaht/.ssh/id_rsa type -1
debug1: identity file /home/folaht/.ssh/id_rsa-cert type -1
debug1: identity file /home/folaht/.ssh/id_dsa type -1
debug1: identity file /home/folaht/.ssh/id_dsa-cert type -1
debug1: identity file /home/folaht/.ssh/id_ecdsa type -1
debug1: identity file /home/folaht/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/folaht/.ssh/id_ed25519 type 3
debug1: identity file /home/folaht/.ssh/id_ed25519-cert type -1
debug1: identity file /home/folaht/.ssh/id_xmss type -1
debug1: identity file /home/folaht/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.0
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4p1 Debian-10+deb9u6
debug1: match: OpenSSH_7.4p1 Debian-10+deb9u6 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 yropeehn:22 as 'admin'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
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:zmeHMN/qXwXICPTWJrJ2Zuf8ej8q+iFeG6hfTTmKmZU
debug1: Host 'yropeehn' is known and matches the ECDSA host key.
debug1: Found key in /home/folaht/.ssh/known_hosts:8
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/folaht/.ssh/id_rsa 
debug1: Will attempt key: /home/folaht/.ssh/id_dsa 
debug1: Will attempt key: /home/folaht/.ssh/id_ecdsa 
debug1: Will attempt key: /home/folaht/.ssh/id_ed25519 ED25519 SHA256:XOHJ5HAEr+AF/ruPpxu5UhpM6XIN/3ZSKeOiMgFdb+s
debug1: Will attempt key: /home/folaht/.ssh/id_xmss 
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/folaht/.ssh/id_rsa
debug1: Trying private key: /home/folaht/.ssh/id_dsa
debug1: Trying private key: /home/folaht/.ssh/id_ecdsa
debug1: Offering public key: /home/folaht/.ssh/id_ed25519 ED25519 SHA256:XOHJ5HAEr+AF/ruPpxu5UhpM6XIN/3ZSKeOiMgFdb+s
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/folaht/.ssh/id_xmss
debug1: No more authentication methods to try.
admin@yropeehn: Permission denied (publickey).

/etc/ssh/sshd_config

#	$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/local/sbin:/usr/local/bin:/usr/bin

# 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 ::
Protocol 2

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key

#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Ciphers and keying
#RekeyLimit default none

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 1024

# Logging
SyslogFacility AUTH
LogLevel ERROR

# Authentication:
LoginGraceTime 2m
PermitRootLogin no
StrictModes yes
MaxAuthTries 6
MaxSessions 10

RSAAuthentication yes
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
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no

# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
PermitEmptyPasswords no

# Change to no to disable s/key passwords
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM no

#AllowAgentForwarding yes
AllowTcpForwarding no
#GatewayPorts no
X11Forwarding no
X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no # pam does that
PrintLastLog yes
TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
MaxStartups 2:30:10
#Banner none

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

# override default of no subsystems
Subsystem	sftp	/usr/lib/ssh/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#	X11Forwarding no
#	AllowTcpForwarding no
#	PermitTTY no
#	ForceCommand cvs server

AllowUsers folaht

Bonjour,
Tu es sûr de ta commande :

ssh -v admin@Yropeehn

ou bien c’est une erreur de frappe ?

$ eval `ssh-agent`
$ ssh-add ~/.ssh/...your admin ssh private key ...
$ ssh -v admin@Yropeehn

?

You’re not using the recommended YunoHost sshd_config >.> …

(And you are not using the recommended template for support topic either - the one mentionned in at least 3 different places on the forum)

Edit: actually, not even saying “Hi” or trying to describe your issue with something else than the topic title ? I’m so fed up with this. We are not dogs magically guessing your issue. Explain stuff, and at the very least, say hello. Locking the topic.

1 Like