Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected command error when using SSH #1031

Closed
Tracked by #1671
JirkaAichler opened this issue Jun 16, 2021 · 5 comments · Fixed by #2081 or #2103
Closed
Tracked by #1671

Unexpected command error when using SSH #1031

JirkaAichler opened this issue Jun 16, 2021 · 5 comments · Fixed by #2081 or #2103
Assignees
Labels
community-upvoted enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits
Milestone

Comments

@JirkaAichler
Copy link

JirkaAichler commented Jun 16, 2021

I am getting the following error that tells me to contact the support:

λ zowe zos-uss issue ssh "echo test"
Unexpected Command Error:
Please review the message and stack below.
Contact the creator of handler:
"C:\Users\ja628455\AppData\Roaming\npm\node_modules\@zowe\cli\lib\zosuss\issue\ssh/Ssh.handler"
Message:
Invalid username
Stack:
Error: Invalid username
    at Client.connect (C:\Users\ja628455\AppData\Roaming\npm\node_modules\@zowe\cli\node_modules\ssh2\lib\client.js:192:11)
    at C:\Users\ja628455\AppData\Roaming\npm\node_modules\@zowe\cli\node_modules\@zowe\zos-uss-for-zowe-sdk\lib\Shell.js:102:18
    at new Promise (<anonymous>)
    at Function.executeSsh (C:\Users\ja628455\AppData\Roaming\npm\node_modules\@zowe\cli\node_modules\@zowe\zos-uss-for-zowe-sdk\lib\Shell.js:33:25)
    at Handler.<anonymous> (C:\Users\ja628455\AppData\Roaming\npm\node_modules\@zowe\cli\lib\zosuss\issue\ssh\Ssh.handler.js:38:57)
    at Generator.next (<anonymous>)
    at C:\Users\ja628455\AppData\Roaming\npm\node_modules\@zowe\cli\lib\zosuss\issue\ssh\Ssh.handler.js:18:71
    at new Promise (<anonymous>)
    at __awaiter (C:\Users\ja628455\AppData\Roaming\npm\node_modules\@zowe\cli\lib\zosuss\issue\ssh\Ssh.handler.js:14:12)
    at Handler.processCmd (C:\Users\ja628455\AppData\Roaming\npm\node_modules\@zowe\cli\lib\zosuss\issue\ssh\Ssh.handler.js:31:16)

Steps to reproduce:
My profiles do not contain a user name and password but contain an APIML JWT token.

Base:

  name:     sys1 (default)
  contents:
    host:               sys1.com
    port:               1443
    rejectUnauthorized: true
    tokenType:          apimlAuthenticationToken
    tokenValue:         1234

SSH:

  name:     sys1 (default)
  contents:
    host: sys1.com
    port: 22
λ zowe --version
6.32.0
@MikeBauerCA MikeBauerCA added this to the Backlog milestone Aug 26, 2021
@MarkAckert
Copy link
Member

MarkAckert commented Nov 11, 2022

We should catch the error that's thrown in the SSH Handler and wrap it in an ImperativeError.

Optionally, we can modify Imperative's error output for uncaught errors - I think the error content is clear enough as is, but we could remove the Contact the creator of handler line.

Marking this as enhancement, since the code is working as expected and does provide accurate error output.

@MarkAckert MarkAckert added for-review To be reviewed in an Eng & Prod Mgmt meeting priority-low Legit issue but cosmetic or nice-to-have enhancement New feature or request labels Nov 11, 2022
@github-actions
Copy link

Thank you for raising this issue.
The community has 90 days to upvote 👍 the issue.
If it receives 5 upvotes, we will move it to our backlog. If not, we will close it.

@JTonda JTonda removed the for-review To be reviewed in an Eng & Prod Mgmt meeting label Jan 30, 2023
@zFernand0 zFernand0 added enhancement New feature or request and removed enhancement New feature or request labels Mar 8, 2023
@github-actions
Copy link

github-actions bot commented Mar 8, 2023

Thank you for raising this enhancement request.
The community has 90 days to vote on it.
If the enhancement receives at least 5 upvotes, it is added to our development backlog.
If it receives fewer votes, the issue is closed.

@zFernand0 zFernand0 added priority-medium Not functioning - next quarter if capacity permits and removed priority-low Legit issue but cosmetic or nice-to-have labels Mar 8, 2023
@zFernand0 zFernand0 mentioned this issue Mar 29, 2023
28 tasks
@adam-wolfe adam-wolfe mentioned this issue May 31, 2023
19 tasks
@adam-wolfe
Copy link
Contributor

adam-wolfe commented Mar 4, 2024

I am seeing similar behavior if I have no default SSH profile defined in a team config (and I have a base profile that goes through the APIML). (in 7.x.x and 8.0.0-next.202402271901)

@adam-wolfe adam-wolfe mentioned this issue Mar 4, 2024
23 tasks
This was referenced Mar 6, 2024
@ATorrise ATorrise linked a pull request Mar 6, 2024 that will close this issue
4 tasks
@ATorrise ATorrise self-assigned this Mar 7, 2024
@ATorrise
Copy link
Contributor

Unsure why this linked issue wasn't closed with the merging of #2081 so am closing now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-upvoted enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits
Projects
Status: Closed
7 participants