0

I have an arcade run on raspberry pi 3 flashed with RetroPie 4.4.

I already enabled SSH capability via raspi-config menu

enter image description here


Test

I can SSH into my Pi perfectly fine, but I can not SFTP into it.

Credentials: pi/raspberry

SSH

enter image description here

SFTP

configure & error

enter image description here


Questions

How would one go about and debug this further ?


I'm open to any suggestions at this moment.

Any hints/suggestions / helps on this be will be much appreciated!


cat /etc/ssh/sshd_config

#       $OpenBSD: sshd_config,v 1.84 2011/05/23 03:30:07 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

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

# 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

# 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 yes

# 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 yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none

# no default banner path
#Banner none

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

# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       ForceCommand cvs server
Match User debian,pi,ubnt,ubuntu,vyos,vyatta,bananapi,osmc,xbian,admin Address *,!192.168.0.0/16,!10.0.0.0/8,!172.16.0.0/12,!127.0.0.1
PasswordAuthentication no
  • "If SSH is enabled, and the password for the ‘pi’ user is still ‘raspberry’, you’ll see a warning message whenever you boot the Pi, whether to the desktop or the command line." raspberrypi.org/blog/a-security-update-for-raspbian-pixel Works OK with FileZilla and proper password! – Milliways Nov 7 '18 at 23:55
  • @Milliways : I entered the correct password already. I don't know why it won't let me in. – kyo Nov 8 '18 at 0:36
  • Because sftp has to be enabled in /etc/ssh/sshd_config. – Janka Nov 8 '18 at 1:02
  • @Janka can u answer it with the flag of sshd ? – kyo Nov 8 '18 at 1:06
  • In your question you state password raspberry – Milliways Nov 8 '18 at 1:10
1

You have to add a line

Subsystem sftp internal-sftp

to /etc/ssh/sshd_config to enable sftp.

  • Mine seems to already have this line Subsystem sftp /usr/libexec/sftp-server – kyo Nov 8 '18 at 23:03
  • Does the file /usr/libexec/sftp-server exist? – Janka Nov 8 '18 at 23:12
  • This line that you suggested is dangerous. As soon as I did it, I locked myself out. I can no longer SSH into my Pi anymore. I had to plug the keyboard into the Pi and uncomment that line back out. – kyo Nov 8 '18 at 23:26
  • Any messing with the sshd config may lock you out. Check the log what happened. – Janka Nov 8 '18 at 23:28
  • I ran this command which /usr/libexec/sftp-server I don't see anyting result. I guess I don't have this installed in my Pi. Is it expected to be install by default ? I also ran basic install and update via the pi set up menu. – kyo Nov 8 '18 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.