Liebe Synology-Community,
ich weiß, zu diesem Thema gibt es schon einige Einträge, aber bisher konnte mir keiner helfen.
Ich will mich mit dem Benutzer "webssh" (Gruppe: User) per ssh und key auf die DiskStation (2bay 214se) verbinden.
Folgende Files sehen wie folgt aus:
/etc/passwd
/etc/ssh/sshd_config
$HOME/.ssh des Benutzers webssh:
Der Key wurde per
ohne passphrase und ohne namen
Anschließend wurde der pub per
geschrieben. Per chmod habe ich diverse rechte gesetzt (siehen oben)
Wenn ich nun versuche mit
zu verbinden, bekomme ich die Frage nach dem Passwort :/
Was mache ich falsch, bzw. habe ich vergessen?
Liebe Grüße
ich weiß, zu diesem Thema gibt es schon einige Einträge, aber bisher konnte mir keiner helfen.
Ich will mich mit dem Benutzer "webssh" (Gruppe: User) per ssh und key auf die DiskStation (2bay 214se) verbinden.
Folgende Files sehen wie folgt aus:
/etc/passwd
Rich (BBCode):
admin:x:1024:100:System default user:/var/services/homes/admin:/bin/sh
anonymous:x:21:21:Anonymous FTP User:/nonexist:/sbin/nologin
avahi:x:84:84:Avahi mDNS daemon:/noexist:/bin/false
dovecot:x:143:143:Dovecot User:/nonexist:/sbin/nologin
ftp:x:21:21:Anonymous FTP User:/nonexist:/sbin/nologin
guest:x:1025:100:Guest:/nonexist:/sbin/nologin
http:x:1023:1023:http:/var/services/web:/bin/false
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
maether:x:1026:100:Admin:/var/services/homes/maether:/sbin/nologin
martin:x:1027:100:User:/var/services/homes/martin:/sbin/nologin
mysql:x:66:66:MariaDB User:/var/services/mysql:/bin/false
nobody:x:99:99:nobody:/:/bin/false
ntp:x:87:87:Network Time Protocol:/var/lib/ntp:/sbin/nologin
postfix:x:125:125:Postfix User:/nonexist:/sbin/nologin
postgres:x:55:55:PostgreSQL User:/var/services/pgsql:/bin/sh
root:x:0:0:root:/root:/bin/ash
smmsp:x:25:25:Sendmail Submission User:/var/spool/clientmqueue:/sbin/nologin
spamfilter:x:783:99:Spamassassin User:/var/spool/postfix:/sbin/nologin
webssh:x:1031:100:webssh:/var/services/homes/webssh:/bin/sh
/etc/ssh/sshd_config
Rich (BBCode):
Ciphers 3des-cbc,aes128-cbc,aes128-ctr,aes128-gcm@openssh.com,aes192-cbc,aes192-ctr,aes256-cbc,aes256-ctr,aes256-gcm@openssh.com,arcfour,arcfour128,arcfour256,blowfish-cbc,cast128-cbc,chacha20-poly1305@openssh.com,rijndael-cbc@lysator.liu.se
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
MACs hmac-md5,hmac-md5-96,hmac-md5-96-etm@openssh.com,hmac-md5-etm@openssh.com,hmac-ripemd160,hmac-ripemd160-etm@openssh.com,hmac-ripemd160@openssh.com,hmac-sha1,hmac-sha1-96,hmac-sha1-96-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha2-256,hmac-sha2-256-etm@openssh.com,hmac-sha2-512,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com,umac-128@openssh.com,umac-64-etm@openssh.com,umac-64@openssh.com
# $OpenBSD: sshd_config,v 1.93 2014/01/10 05:59:19 djm 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 ::
# The default requires explicit activation of protocol 1
#Protocol 2
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024
# Ciphers and keying
#RekeyLimit default none
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin yes
#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
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#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 yes
#AllowAgentForwarding yes
AllowTcpForwarding no
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation sandbox # Default for new installations.
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# override default of no subsystems
#Subsystem sftp /usr/libexec/sftp-server
Subsystem sftp internal-sftp -f DAEMON -u 000
# the following are HPN related configuration options
# tcp receive buffer polling. disable in non autotuning kernels
#TcpRcvBufPoll yes
# disable hpn performance boosts
#HPNDisabled no
# buffer size for hpn to non-hpn connections
#HPNBufferSize 2048
# allow the use of the none cipher
#NoneEnabled no
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
Match User root
AllowTcpForwarding yes
$HOME/.ssh des Benutzers webssh:
Rich (BBCode):
/volume1/homes/webssh $ echo $HOME
/var/services/homes/webssh
/volume1/homes/webssh $ cd /var/services/homes/webssh/.ssh
/volume1/homes/webssh/.ssh $ ls -lisa
131539 4 drwx------ 2 webssh users 4096 Feb 25 23:24 .
131217 4 drwxrwxrwx 3 webssh users 4096 Feb 25 23:18 ..
131553 4 -rw------- 1 webssh users 400 Feb 25 23:20 authorized_files
131732 4 -rw------- 1 webssh users 1675 Feb 25 23:19 id_rsa
131739 4 -rw-r--r-- 1 webssh users 400 Feb 25 23:19 id_rsa.pub
131205 4 -rw-r--r-- 1 webssh users 179 Feb 25 23:24 known_hosts
Der Key wurde per
Rich (BBCode):
ssh-keygen -t rsa
Anschließend wurde der pub per
Rich (BBCode):
cat webssh.pub >> authorized_keys
Wenn ich nun versuche mit
Rich (BBCode):
/volume1/homes/webssh/.ssh $ ssh -p 22201 webssh@localhost
webssh@localhost's password:
Was mache ich falsch, bzw. habe ich vergessen?
Liebe Grüße
Zuletzt bearbeitet:
