blog notos

How to configure Bash in SSH
on an IBM i?

The addition of new packages to IBM’s Open Source module has given many people with little or no IBM i experience an entry point into this ecosystem.

The considerable addition of new packages to IBM’s Open Source module has given many people with little or no IBM i experience an entry point into this ecosystem. They now have many of the components to which they are already accustomed, but unfortunately a number of convenience features are missing from the default shell. For example, the up arrow does not retrieve the last command, and the tab key does not autocomplete paths. To remedy this lack of productivity, simply use Bash as a shell.

Two approaches are possible:

  1. Using chsh
  • Install the chsh package via the Open Source Module Manager :

 

  • On a shell, run the command chsh -s /QOpenSys/pkgs/bin/bash -u ARMONIE. Replace ARMONIE with the IBM i profile name

Note: This modification applies only to the specified “ARMONIE” user, and will take effect the next time you reconnect to SSH.

 

  1. Using SQL
  • Connecting to the SQL Script Executor
  • Execute the following SQL command: CALL QSYS2.SET_PASE_SHELL_INFO(‘ARMONIE’, ‘/QOpenSys/pkgs/bin/bash’);

Note: *It is also possible to replace the user with ” DEFAULT” to apply the modification to all users who have not explicitly configured a shell.

Partager cet article