WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] SFTP via openssh on x86 and x64  (Read 2897 times)

Offline bonbob

  • Jr. Member
  • **
  • Posts: 99
[Solved] SFTP via openssh on x86 and x64
« on: June 15, 2020, 12:19:50 AM »
Hi to all!
I have two home miniservers. One of them with TinyCore x86, and the other CorePure64. Both of them 11 version, and both have launched openssh server. So ssh accsess work fine. Not so long ago i try launch SFTP via openssh. I just added to /usr/local/etc/ssh/sshd_config a few lines such as:
Code: [Select]
Subsystem sftp internal-sftp
Match Group ftpuser
X11Forwarding no
AllowTcpForwarding no
ChrootDirectory %h
ForceCommand internal-sftp
and restart opensshd. On x86 SFTP has appeared, but on x64 - not. Confiurations is identical on both miniservers.  Version of openssh in repo is the same too. Can anyone check, is there problem in openssh compilation or maybe i have missed something?
« Last Edit: June 17, 2020, 05:43:44 AM by Rich »

Offline bonbob

  • Jr. Member
  • **
  • Posts: 99
Re: SFTP via openssh on x86 and x64
« Reply #1 on: June 16, 2020, 07:20:37 AM »
I'm Sorry. :(
I missed one difference between configuration. In default config for x86 path to sftp-server is valid
Code: [Select]
Subsystem sftp /usr/local/lib/openssh/sftp-serverBut in default config for CorePure64 path is wrong:
Code: [Select]
Subsystem sftp /usr/local/libexec/sftp-serverYou need change this parameter to real value and SFTP will work.

aus9

  • Guest
Re: SFTP via openssh on x86 and x64
« Reply #2 on: June 16, 2020, 06:54:51 PM »
I know very little about using sftp but for me on 11.1 x 64 bit ....I have
Code: [Select]
tce-load -i openssh
sudo find /usr -name sftp-server
-> /usr/local/lib/openssh/sftp-server

# I am aware I need to make real configs and start daemon
cat sshd_config.orig | grep sftp-server
Subsystem sftp /usr/local/lib/openssh/sftp-server

openssh v 8.1p1 last changed 2019/12/12 updated 7.2p2 -> 8.1p1

« Last Edit: June 16, 2020, 06:56:39 PM by aus9 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: SFTP via openssh on x86 and x64
« Reply #3 on: June 16, 2020, 09:48:11 PM »
Hi bonbob
I just unpacked the x86 and x86_64  openssh.tcz  extensions from the TC11 repository. In both cases, the  sshd_config.orig  file
contained:
Code: [Select]
Subsystem sftp /usr/local/lib/openssh/sftp-server

Offline bonbob

  • Jr. Member
  • **
  • Posts: 99
Re: SFTP via openssh on x86 and x64
« Reply #4 on: June 17, 2020, 05:19:57 AM »
Delete please this topic.
All configs is valid. In my case sshd_config was rewritten by backup after migrating to newer version of CorePure64.
Seems older version openssh really has different path to sftp-server but now it is not actual anymore.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
[Solved] Re: SFTP via openssh on x86 and x64
« Reply #5 on: June 17, 2020, 05:42:21 AM »
Hi bonbob
Delete please this topic. ...
I will mark this topic as solved.

After searching the repositories it turns out that the x86 and x86_64  openssh.tcz  extensions from TC4 used  /usr/local/libexec/
to store  sftp-server.
« Last Edit: June 17, 2020, 05:43:57 AM by Rich »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: [Solved] SFTP via openssh on x86 and x64
« Reply #6 on: June 17, 2020, 06:38:41 AM »
Rather than using libexec, using the extension name let’s you know where stuff came from.