Possible to FTP to DietPi and get to /mnt?

Having issues with your DietPi installation or found a bug? Post it here.
User avatar
trendy
Posts: 282
Joined: Tue Feb 25, 2020 2:54 pm

Re: Possible to FTP to DietPi and get to /mnt?

Post by trendy »

sftp is a different story, for that there is indeed a separate openssh-sftp-server.
But scp works by default on the default dropbear for as long as I can remember from OpenWrt forum questions.
User avatar
Joulinar
Posts: 4205
Joined: Sat Nov 16, 2019 12:49 am

Re: Possible to FTP to DietPi and get to /mnt?

Post by Joulinar »

still, for me the OpenSSH client is needed as the SCP executable is required. And this is missing if I uninstall OpenSSH Client

this is the debug log from WinSCP

Code: Select all

! 2021-03-18 17:08:34.265 -bash: line 37: /usr/bin/scp: No such file or directory
< 2021-03-18 17:08:34.265 WinSCP: this is end-of-file:127
* 2021-03-18 17:08:34.265 (ECommand) **Copying files from remote side failed.**
* 2021-03-18 17:08:34.265 Cannot execute SCP to start transfer. Please make sure that SCP is installed on the server and path to it is included in PATH. You may also try SFTP instead of SCP.
* 2021-03-18 17:08:34.265 Command failed with return code 127.
And /usr/bin/scp is part of OpenSSH client only

https://packages.debian.org/search?mode ... Fbin%2Fscp
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
trendy
Posts: 282
Joined: Tue Feb 25, 2020 2:54 pm

Re: Possible to FTP to DietPi and get to /mnt?

Post by trendy »

If that is the case, the openssh-client is installed by default. I do not have the openssh-client installed in dietpi software, SCP however works fine for me.
User avatar
Joulinar
Posts: 4205
Joined: Sat Nov 16, 2019 12:49 am

Re: Possible to FTP to DietPi and get to /mnt?

Post by Joulinar »

easy to check ;)

Code: Select all

dpkg -l openssh-client
But in general it is enough to have /usr/bin/scp available
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
trendy
Posts: 282
Joined: Tue Feb 25, 2020 2:54 pm

Re: Possible to FTP to DietPi and get to /mnt?

Post by trendy »

Yes, there it is installed.

Code: Select all

ii  openssh-client 1:7.9p1-10+deb10u2 armhf        secure shell (SSH) client, for secure access to remote machines
However I never installed the OpenSSH Client and the system runs with Pihole installed only.
Joulinar wrote: Tue Mar 16, 2021 11:45 pm you would need to install OpenSSH Client (software ID 0) if you like to use SCP
So it most likely came preinstalled in the image and worked out of the box.
User avatar
Joulinar
Posts: 4205
Joined: Sat Nov 16, 2019 12:49 am

Re: Possible to FTP to DietPi and get to /mnt?

Post by Joulinar »

@trendy can you check install state for OpenSSH client

Code: Select all

cat /boot/dietpi/.installed | grep -F [0]
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 2780
Joined: Sat Nov 18, 2017 6:21 pm

Re: Possible to FTP to DietPi and get to /mnt?

Post by MichaIng »

It's definitely not pre-installed, but good to know that all is as expected. So for Dropbear SCP support there is still an scp executable required, while SFTP can be covered with the linked alternative one.
User avatar
Joulinar
Posts: 4205
Joined: Sat Nov 16, 2019 12:49 am

Re: Possible to FTP to DietPi and get to /mnt?

Post by Joulinar »

@MichaIng
personally I have seen that a couple of times where OpenSSH client was installed during initial setup even if not selected. But I would need to run some test to find the pattern
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 2780
Joined: Sat Nov 18, 2017 6:21 pm

Re: Possible to FTP to DietPi and get to /mnt?

Post by MichaIng »

That would be interesting indeed. On image updates I do at least one full first run setup as well and didn't recognise this so far. I cannot imagine a kernel package or so pulling OpenSSH as dependency :?.
User avatar
Joulinar
Posts: 4205
Joined: Sat Nov 16, 2019 12:49 am

Re: Possible to FTP to DietPi and get to /mnt?

Post by Joulinar »

nope it was on my list for a while to report to you, as it was installed by first run as pre-selected package. But give me some time to verify.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply