Creating SOCKS session on OCI bastion fails on Windows
--key-details json parameter is not recognized. It works fine on MacOS.
Usage: oci.exe bastion session create-session-create-dynamic-port-forwarding-session-target-resource-details [OPTIONS] Error: Got unexpected extra argument (publicKeyContent:\ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCdo2k3RELR3EMjq5fSNcrN+YjAgTNrpDq3bKzYzznCwACxfknSBkU0yNRNgPL3cWTQa3hiOB4faS1j59CClIRAMUG2BEO9iRKnq9ZgQ8vfDZWY...
Json parameter format is correct though. It would be better to pass a public key file like other connection modes (managed-ssh and port-forwarding)
Hi @jlecerf62 You can use the below commands to generate a dummy JSON file and then pass the JSON file after editing it -
oci bastion session create-session-create-dynamic-port-forwarding-session-target-resource-details --generate-param-json-input key-details>a.json
edit and modify testfile.json
oci bastion session create-session-create-dynamic-port-forwarding-session-target-resource-details --key-details file://C:\path\to\testfile.json
Document for reference - https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions
Hi @pankajmjx, I know but I would like to avoid using file:// since I'm using this command in a powershell script. I'd rather use the JSON formating in string as mentionned here: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliusing.htm#Managing_CLI_Input_and_Output
It works well on MacOS but not on Windows