As400 Ssh



As400 Ssh

This video explains how to start SSH on the IBM i and how to run and configure the BASH shell. Then we are going to take a look at WINSCP which enables you t. If you only have one host in your knowhost file then removing the entire file is a solution. The file will be recreated the next time you ssh into that computer. Before you remove the file you should back up the contents: cp /.ssh/knownhosts /.ssh/knownhosts.old abc123@computer rm /.ssh/knownhosts Method 2 - Targeting the Key Individually. Secure shell daemon (daemon = server). Acts as a server for all ssh tools (ssh, scp, sftp). Interactive logons will be PASE shell logons – allowing t rue Unix ttys. Can be chrooted (user is locked into a given area of the IFS) Also:.ssh-keygen for generating public and private keys.ssh-agent allows you to load keys into memory.

QSHELL and PASE on IBM i are nice tools but remain quite limited with the fixed size 5250 window without scroll bars. Let’s see how to make it better with a secure SSH connection and a few tricks.

Launch SSH Daemon

Considering SSH is installed on your AS400 ie 5733SC1 (OpenSSH, OpenSSL, zlib) in LICPGM, you can start the SSH daemon:

As400


There is no autostart option for this TCP server.
I ended up adding above command to the QSTRUP program so it starts automatically upon IPL. You can connect to your AS400 with Putty from now on.

Default Shell

The default shell is bsh which is quite limited. It can be changed in the sshd_config file adding

as mentioned on IBM website.
ksh is also needed to get command history in your terminal.

As400 Ssh Access Denied

Ssh

Command History

Once ksh is the default shell, you can configure arrow keys to move within command history.
In the user homedir, create a .profile as follow:

As400

Sftp On As400


Now restart the SSH daemon and reconnect.
On the 1st line, we check the shell is ksh since the previous changes apply to SSH connections but QSH nor PASE (QP2TERM).
This is now far more convenient than calling QP2TERM is the 5250 fixed size window!
You can even do the same with bash if it has been installed on your system. Hint: Install 5733OPS Option 3, gcc comes along with bash, perl or even rpm on postintallation.

As400 Ssh Server