SSH on IBM i
Note: this 2011 article is now outdated. Please see Getting started with SSH instead.
————
Secure Shell (SSH), a network protocol used every day by software developers, provides a fast, secure means to transfer files and submit commands to remote servers.
Zend Studio 8.0‘s SSH support allows users to save their PHP scripts onto remote servers such as IBM i.
How to set up SSH on IBM i
SSH runs as a server program, the SSH daemon (sshd). Before sshd can run, it requires a set of public/private key pairs.
Instructions for creating the key pairs and starting the server are given below. There are two versions of instructions, depending on the version of OS.
IBM i v6.1 and higher: one step creates public/private keys (if needed) and starts server
1 |
STRTCPSVR *SSHD |
V5R3 and V5R4: two steps are required
1. First, create the public/private key pairs (only needs to be done once):
1 2 3 4 |
CALL QP2TERM ssh-keygen -t rsa1 -f /QOpenSys/QIBM/UserData/SC1/OpenSSH/openssh-3.5p1/etc/ssh_host_key -N "" ssh-keygen -t dsa -f /QOpenSys/QIBM/UserData/SC1/OpenSSH/openssh-3.5p1/etc/ssh_host_dsa_key -N "" ssh-keygen -t rsa -f /QOpenSys/QIBM/UserData/SC1/OpenSSH/openssh-3.5p1/etc/ssh_host_rsa_key -N "" |
2. Then start sshd (“&” means to run in background):
1 |
/usr/sbin/sshd & |
Leave a Reply
Want to join the discussion?Feel free to contribute!