ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Ssh

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ssh

    Hi,

    need help on SSH as in as400.

    very beginner for this so need as many advices as possible from everyone.

    1. connection issue
    2. executing SSH script through CLLE programming
    3. retrieve log files
    4. .... (update later)

    Thanks.

    Windy
    "Nothing is impossible in coding. If the logic exist in this world, so as programming world. All we need it the bravery to ask others for help and a thanks for all the gifts received"

  • #2
    Re: Ssh

    There are instructions down the page here:


    The userid that starts the daemon must have *ALLOBJ special authority
    The userid that starts the daemon must be 8 or fewer characters long

    Before starting sshd for the first time, you will need to generate host keys:
    PHP Code:
    ssh-keygen -t rsa1 -/QOpenSys/QIBM/UserData/SC1/OpenSSH/openssh-3.5p1/etc/ssh_host_key -"" 
    ssh-keygen -t dsa -/QOpenSys/QIBM/UserData/SC1/OpenSSH/openssh-3.5p1/etc/ssh_host_dsa_key -"" 
    ssh-keygen -t rsa -/QOpenSys/QIBM/UserData/SC1/OpenSSH/openssh-3.5p1/etc/ssh_host_rsa_key -"" 
    You can start the sshd daemon with either one of these CL commands:
    PHP Code:
    QSH CMD ('/QOpenSys/usr/sbin/sshd')
    CALL PGM(QP2SHELLPARM('/QopenSys/usr/sbin/sshd')
    With IBM i 6.1 you can also use STRTCPSVR *SSHD 
    You can stop the sshd daemon at V5R4 by starting the PASE command shell:
    [php]
    CALL PGM(QP2SHELL)
    [php]
    (then issue the command to show active processes)
    PHP Code:
    ps ax 
    (Find the PID number of the process for ssh and issue the kill command, if the PID is 1234...)
    PHP Code:
    kill 1234 



    jamie
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment

    Working...
    X