Skip to content

team profile: ssh not working #2577

@colinpaicemq

Description

@colinpaicemq

Describe the bug

Several problems

I can logon with ssh
ssh [email protected] -i /home/colinpaice/.ssh/id_rsa.pub

if I use

zowe ssh issue command "pwd" ---host 10.1.1.2 --port 22 --cert-file /home/colinpaice/.ssh/id_rsa.pub

using the ssh key ( it does not use my public/private keys I normally use - because this is ssh)

I get

Unexpected Command Error:
Please review the message and stack below.
Contact the creator of handler:
"/usr/lib/node_modules/@zowe/cli/lib/zosuss/issue/ssh/Ssh.handler"
Message:
privateKey value does not contain a (valid) private key
Stack:
Error: privateKey value does not contain a (valid) private key
at Client.connect (/usr/lib/node_modules/@zowe/cli/node_modules/ssh2/lib/client.js:267:15)
at Shell.connect (/usr/lib/node_modules/@zowe/cli/node_modules/@zowe/zos-uss-for-zowe-sdk/lib/Shell.js:151:20)
at /usr/lib/node_modules/@zowe/cli/node_modules/@zowe/zos-uss-for-zowe-sdk/lib/Shell.js:137:19
at new Promise ()
at Shell.executeSsh (/usr/lib/node_modules/@zowe/cli/node_modules/@zowe/zos-uss-for-zowe-sdk/lib/Shell.js:29:25)
at Handler. (/usr/lib/node_modules/@zowe/cli/lib/zosuss/issue/ssh/Ssh.handler.js:38:57)


at Generator.next (<anonymous>)
at /usr/lib/node_modules/@zowe/cli/lib/zosuss/issue/ssh/Ssh.handler.js:18:71
at new Promise (<anonymous>)
at __awaiter (/usr/lib/node_modules/@zowe/cli/lib/zosuss/issue/ssh/Ssh.handler.js:14:12)

zowe ssh issue command "pwd" ---host 10.1.1.2 --port 22 --cert-file /home/colinpaice/.ssh/id_rsa.pub


In Zowe explorer, I do not see my ssh: session under Unix System Services..... only the Zosmf ones.
If I right click on one of these and "issue Unix command " I get

[2025/07/31 09:55:21] [ERROR] Error: Invalid username

my definition is

    "ssh": {
        "type": "ssh",
        "properties": {
            "port": 22,
            "privateKey": "/home/colinpaice/.ssh/id_rsa.pub",
            "user": "colin",
            "host": "10.1.1.2"
        },
        "secure": [ "user"]
    },

I could not see how to automatically cd into the correct directory.

The scenario
I edit a C program. I want to compile it... the only way I see of doing it is to use issue Unix command.
Once in Unix I need to issue cd /u/colin/project1/mymake ( or cd cd /u/colin/project1/ and issue mymake)
it it compiles I want to run it immediately.

I could not see how to do this from with explorer

Expected and actual results

Describe your environment

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnewThe issue wasn't triaged yet

    Type

    No type

    Projects

    Status

    New Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions