SSHD - how to setup shell

By kimot, 25 December, 2022

You can setup different shell you want to us as default shell :
/QOpenSys/usr/bin/bsh - Bourne shell (default shell used by SSH sessions)
/QOpenSys/usr/bin/csh - 
/QOpenSys/usr/bin/ksh - Korn shell
/QOpenSys/usr/bin/qsh - 
/QOpenSys/usr/bin/sh  - 

This SQL procedure allows to set default shell for *CURRENT user (*DEFAULT for all users) :

CALL QSYS2.SET_PASE_SHELL_INFO('*CURRENT', '/QOpenSys/usr/bin/bsh');

or

CALL QSYS2.SET_PASE_SHELL_INFO('*CURRENT', '/QOpenSys/pkgs/bin/bash');

To show how profiles have default shell set up : 

SELECT USER_NAME, SHELL_PATH FROM QSYS2.USER_INFO
WHERE SHELL_PATH <> '';

To show if a system-wide default shell is set :

SELECT PASE_SHELL_PATH FROM QSYS2.USER_INFO WHERE AUTHORIZATION_NAME = 'QSYS';