You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 17, 2021. It is now read-only.
the bastion server in question is (sshPortal)[https://github.com/moul/sshportal]
something in this chunk of code in sshcode.go
errors out with Error Code 255
Dont know exactly what is causing it, but my therory is it is trying to do things on the bastionserver before it is proxied across to the target,
To reproduce, do the following
install sshportal
"invite" a new user, and add a host,
create invite <email, can be false>
# read the readme of the program for how to do so
host create user@host:port --name <hostname, can be anything>
then ssh through sshportal to the host, to verify it is configured properly ssh <hostname>@portal -p 2222
Then test sshcode to verify this issue sshcode --skipsync --ssh-flags "-p 2222" <hostname>@portal
If you are unable to reproduce this issue, go ahead and close this
ifo.uploadCodeServer!="" {
flog.Info("uploading local code-server binary...")
err=copyCodeServerBinary(o.sshFlags, host, o.uploadCodeServer, codeServerPath)
iferr!=nil {
returnxerrors.Errorf("failed to upload local code-server binary to remote server: %w", err)
}
sshCmdStr:=fmt.Sprintf("ssh %v %v 'chmod +x %v'",
o.sshFlags, host, codeServerPath,
)
sshCmd:=exec.Command("sh", "-l", "-c", sshCmdStr)
sshCmd.Stdout=os.StdoutsshCmd.Stderr=os.Stderrerr=sshCmd.Run()
iferr!=nil {
returnxerrors.Errorf("failed to make code-server binary executable:\n---ssh cmd---\n%s: %w",
sshCmdStr,
err,
)
}
} else {
flog.Info("ensuring code-server is updated...")
dlScript:=downloadScript(codeServerPath)
// Downloads the latest code-server and allows it to be executed.sshCmdStr:=fmt.Sprintf("ssh %v %v '/usr/bin/env bash -l'", o.sshFlags, host)
sshCmd:=exec.Command("sh", "-l", "-c", sshCmdStr)
sshCmd.Stdout=os.StdoutsshCmd.Stderr=os.StderrsshCmd.Stdin=strings.NewReader(dlScript)
err=sshCmd.Run()
iferr!=nil {
returnxerrors.Errorf("failed to update code-server:\n---ssh cmd---\n%s"+"\n---download script---\n%s: %w",
sshCmdStr,
dlScript,
err,
)
}
}
The text was updated successfully, but these errors were encountered:
deansheather
changed the title
{bug}{Interesting} Unable to use with Bastion Server (err255)
Unable to use with Bastion Server (err255)
Feb 21, 2020
the bastion server in question is (sshPortal)[https://github.com/moul/sshportal]
something in this chunk of code in
sshcode.go
errors out with Error Code 255
Dont know exactly what is causing it, but my therory is it is trying to do things on the bastionserver before it is proxied across to the target,
To reproduce, do the following
install sshportal
"invite" a new user, and add a host,
then ssh through sshportal to the host, to verify it is configured properly
ssh <hostname>@portal -p 2222
Then test sshcode to verify this issue
sshcode --skipsync --ssh-flags "-p 2222" <hostname>@portal
If you are unable to reproduce this issue, go ahead and close this
The text was updated successfully, but these errors were encountered: