Original Message:
Sent: Tue September 09, 2025 09:19 PM
From: Roman Chloupek
Subject: How to SFTP on IBM i
Hello Pino, Ravisankar, and Others,
You may also check whether your chrooted environment was impacted by an apparent bug in the chroot_setup_script.sh (if that is what you used to create the chrooted environment) which was the issue I had to resolve.
The main executable (your chrooted user depends on) is a clone of the sftp-server command which the chroot_setup_script.sh script copies to your /QOpenSys/QIBM/UserData/SC1/OpenSSH/chroot/QOpenSys/QIBM/ProdData/SC1/OpenSSH/libexec folder. That executable was updated by IBM some time ago due to security patching, and one of the libraries it now depends on is called libcrypto.so.3 -- you can verify that by running PASE command "dump -H <path-to-the>sftp-server". Unfortunately, the chroot_setup_script.sh script was not updated and it still copies the older, deprecated version of the library called libcrypto.so.1.1
To fix this, you can either edit the chroot_setup_script.sh (that's what I did since it gets rerun often) and rerun it, or ,you can copy the missing library to the /QOpenSys/QIBM/UserData/SC1/OpenSSH/chroot/usr/lib folder (where the libcrypto.so.1.1 was previously copied).
Hope this helps. Let me know if you get stuck.
Roman
------------------------------
Roman Chloupek
Original Message:
Sent: Tue September 09, 2025 08:48 AM
From: Matt Seeberger
Subject: How to SFTP on IBM i
I set this up for a customer the other day. I ran into issues with SFTP honoring the home directory path with the "." in it. I believe what fixed it in the end was one or all of these 3 things:
- Make sure the owner of the ...home/UserX folder is UserX
- Set the Locale to *NONE
CHGUSRPRF USRPRF(UserX) LOCALE(*NONE) - Set the proper permissions on the ...home/UserX folder
chmod 755 /QOpenSys/QIBM/UserData/SC1/OpenSSH/chroot/./home/userX
Some of this information is here:
Using chroot on the IBM i to Restrict ssh, sftp, and scp to Specific Directories
Ibm | remove preview |
 | Using chroot on the IBM i to Restrict ssh, sftp, and scp to Specific Directories | This document provides instructions for implementing the chroot function which isolates ssh, sftp, and scp users into specific directories in the Integrated File System (IFS). | View this on Ibm > |
|
|
and here:
Configuring the IBM i SSHD Server to Use Public-Key Authentication
Ibm | remove preview |
| Configuring the IBM i SSHD Server to Use Public-Key Authentication | This document provides the steps necessary to configure Public-key authentication on the IBM i SSHD. | View this on Ibm > |
|
|
------------------------------
Matt Seeberger
Power i Engineer
CMA Technology Solutions
Original Message:
Sent: Mon September 08, 2025 05:44 AM
From: Pino Mariotto
Subject: How to SFTP on IBM i
Dear Satid,
I have already tried that but unfortunately when the home dir path of the user profile becomes /QOpenSys/QIBM/UserData/SC1/OpenSSH/chroot/./home/userX , when logging in with ssh the window closes immediately after having typed the password. Removing the dot (/.) from the home dir path lets the user login again but he is not restricted to that directory
Thank you for your responses
------------------------------
Pino Mariotto
Original Message:
Sent: Sat September 06, 2025 06:57 AM
From: Satid S
Subject: How to SFTP on IBM i
Dear Pino
Please study this IBM i Tehcnote to see if it helps with your case: Using chroot on the IBM i to Restrict ssh, sftp, and scp to Specific Directories at https://www.ibm.com/support/pages/using-chroot-ibm-i-restrict-ssh-sftp-and-scp-specific-directories.
------------------------------
Satid S
Original Message:
Sent: Fri September 05, 2025 06:18 AM
From: Pino Mariotto
Subject: How to SFTP on IBM i
Hi, I am struggling with that too. Did you solved it ?
It seems the problem is with the the dot (/.) . Home dir path of the user profile becomes /QOpenSys/QIBM/UserData/SC1/OpenSSH/chroot/./home/userX , when logging in with ssh the window closes immediately after having typed the password. Removing the dot (/.) from the home dir path lets the user login again but he is not restricted to that directory
------------------------------
Pino Mariotto
Original Message:
Sent: Tue May 14, 2024 04:39 AM
From: Ravisankar Pandian
Subject: How to SFTP on IBM i
Hi Satid,
Thank you for the reply.
- Yes, I did use the "Restricted Access Method" described in my GitHub repo.
- The steps given in the "Restricted Access Method" are actually from the IBMi's documentation Using chroot on the IBM i to Restrict ssh, sftp, and scp to Specific Directories.
- I also checked the chroot_config.log and found no possible issues there. Attached the same for your reference.
- I am also confused because, all the steps given on the IBMi documentation have been completed successfully. But still the connection is getting closed in 4-5 seconds.
- By looking at the screenshot below, I could see that the SFTP actually got initiated and due to some configuration/network issue the connection is closed. Notice the message "ECDSA key fingerprint is SHA256:xxxxx" --> does that mean the SFTP got connected at first?

- Please let me know your thoughts on this.
Regards,
------------------------------
Ravisankar Pandian
Original Message:
Sent: Mon May 13, 2024 09:26 PM
From: Satid S
Subject: How to SFTP on IBM i
Dear Ravisankar
I'm confused. Do you use "Restricted Access" method described in your provided Github link? If so, how do you encounter the problem when you already have those steps described in your link (which imply they should work)? My guess is that one of those commands in the long list of preparation steps may have an error that you may overlook. Do you ensure each command you run does not have an error returned by IBM i?
------------------------------
Satid S
Original Message:
Sent: Sun May 12, 2024 11:07 PM
From: Ravisankar Pandian
Subject: How to SFTP on IBM i
I was trying to setup an SFTP access for IBMi where my IBMi would be acting as the host and an SAP server would be acting as a client.
I did all these steps given in this link. Note: I wanted to give restricted access to the SFTP client so I had to use CHROOT to create a 'jailed root' for the user profile using which the SFTP will be initiated.
Everything else works fine, but when I initiate the connection, the connection gets closed in 5-6 seconds.
Please see the screenshot below.

Note: The full access method given in the above link works fine. But I'm trying to setup the 'jailed root' method using CHROOT.
Could you please tell me what am I doing wrong?
Regards,
Ravi.
------------------------------
Ravisankar Pandian
Original Message:
Sent: Wed April 17, 2024 12:47 PM
From: ace ace
Subject: How to SFTP on IBM i
With the open PASE tools (yum), if ones want to avoid string script parsing as much as possible and need a robust solution with db usage, it is worth IMHO using a proper high level language given that SFTP and ODBC and error handling are usually decent (and useful in case of logging, auditing and faults). And invoke it from CL (using env vars or a db record).
Usually the solution is even more compact and simple than a pure shell script.
Anyway, given the pervasive and ubiquity requirements (like FTP in the past, and we got the command for it) in businesses, it would be nice if IBM considered to bring a standard CL/ILE solution for SFTP, usually basic operation like SENDFILE , RECEIVEFILE, LISTREMOTEDIR macro operations should be sufficient.
Even maybe an SQL interface to it (like it is fashion nowadays for many services) with robust exception returning...
------------------------------
--ft
Original Message:
Sent: Thu August 17, 2023 04:58 PM
From: Amy Vozza
Subject: How to SFTP on IBM i
Where can I find steps or documentation for setup, with examples, if possible, to do unattended SFTP on the IBM i? We have a need to do SFTP instead of FTPS.
------------------------------
Amy Vozza
------------------------------