Tuesday, December 30, 2025

Moving IFS Files Between IBM i and Linux Systems Just Got Easier with QSHSCP

If you’re anything like me, you’re always looking for efficient ways to move files and objects between systems. Over the holidays, I needed a fast, reliable way to transfer files between two IBM i systems and a Linux system using SSH. Since scp is already part of the IBM i open-source SSH tooling, it felt like the perfect foundation for a simple utility command. That’s what led me to create the QSHSCP command and share it with others who utilize my QShell on i app. 

The QSHSCP command is essentially a thin CL wrapper around the PASE scp command. It allows you to securely send and receive files over SSH connections without having to drop into a shell session. While my usual go-to tool is SFTP, I found SCP to be surprisingly efficient once I started working with it.

With QSHSCP, I can easily send IFS files between IBM i systems, as well as to and from Windows, Linux, or AIX systems—such as a cloud-based backup server or an IBM Power Cloud environment.

One intentional design choice—whether you see it as a limitation or a strength—is that QSHSCP only supports SSH key-based authentication. By relying exclusively on public/private key pairs, there’s no need to exchange or store passwords between systems, which improves both security and automation.

Below is an example of using the QSHSCP command to send a file from a local IBM i system to a remote IBM i or Linux system for backup purposes or to deploy new objects:

QSHONI/QSHSCP CMDPFXPARM('-v')                                    
      KEYFILE('/home/user1/.ssh/id_rsa.ppk')     
      USER(user1)                                     
      HOST(myhost.com)                       
      PORT(22)                                       
      ACTION(*SEND)                                  
      REPLLOCAL(*NO)                                    
      LOCALFILE('/home/user1/mylib.savf')          
      REMOTEFILE('/home/user1/mylib.savf')         
      DEBUGCMD(*NO)                                    
      DSPSTDOUT(*NO)                                   
      PRTSTDOUT(*NO)        

QSHSCP also serves as a solid starting point for building additional SCP-based utility commands on IBM i. As part of my upcoming MobiConnect product, I’ll be adding extended object management capabilities—allowing you to directly save and restore IBM i libraries, objects, and IFS files over scp. In additional to object management utilities MobiConnect will make it easier to integrate IBM i with open-source applications and web services from traditional CL and RPG programs.

For more details on the FREE QSHSCP command, visit: the QSHSCP command URL

To learn more about MobiConnect and connecting all your systems and applications, visit: https://www.mobigogo.net
Email: info@mobigogo.net or richard@mobigogo.net