copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2021-09-22 |
IBM Cloud CLI, ibmcloud cli, ibmcloud, ibmcloud dev, cli, command line, command-line, developer tools, private endpoints, shell |
cli |
{:shortdesc: .shortdesc} {:screen: .screen} {:codeblock: .codeblock} {:pre: .pre} {:note: .note} {:deprecated: .deprecated} {:important: .important} {:tip: .tip} {:external: target="_blank" .external}
{: #cli-private-endpoints}
To ensure that you have enhanced control and security over your data when you use the {{site.data.keyword.cloud_notm}} Command Line Interface (CLI), you have the option of using private routes to {{site.data.keyword.cloud_notm}} endpoints. Private routes are not accessible or reachable over the internet. By using the {{site.data.keyword.cloud_notm}} private endpoints feature, you can protect your data from threats from the public network and logically extend your private network. {: shortdesc}
The CLI uses the private endpoint support that is provided by the {{site.data.keyword.cloud_notm}} platform. Platform services that are used by the core CLI provide private endpoint support.
{: #cli-private-endpoints-prereqs}
You must first enable virtual routing and forwarding in your account, and then you can enable the use of {{site.data.keyword.cloud_notm}} private service endpoints. For more information about setting up your account to support the private connectivity option, see Enabling VRF and service endpoints. In addition to enabling VRF, you must be on a private network on ibmcloud
with classic infrastructure. For more information, see how to connect to the {{site.data.keyword.cloud_notm}} VPN.
To learn more about private connections on {{site.data.keyword.cloud_notm}}, see Secure access to services by using service endpoints.
The core CLI is supported only on classic infrastructure when the private endpoints feature is enabled. Certain core features and commands are currently not supported on VPC infrastructure. {: important}
{: #cli-private-endpoints-shell}
To install the latest CLI for your OS from the shell manually, use the following command for your OS:
If you don't want to install from the shell because it might use root permissions, you can download and run the installer. {: tip}
-
For Mac, copy and paste the following command to a command line and run it:
curl -fsSL https://ibm-cloud-cli-installer-scripts.s3.private.us.cloud-object-storage.appdomain.cloud/osx_private | sh
{: codeblock}
-
For Linux™, copy and paste the following command to a command line and run it:
curl -fsSL https://ibm-cloud-cli-installer-scripts.s3.private.us.cloud-object-storage.appdomain.cloud/linux_private | sh
{: codeblock}
-
For Windows™, copy and paste the following command to a Windows™ PowerShell{: external} command prompt and run it:
iex(New-Object Net.WebClient).DownloadString('https://ibm-cloud-cli-installer-scripts.s3.private.us.cloud-object-storage.appdomain.cloud/powershell_private')
{: codeblock}
If you encounter errors like
The underlying connection was closed: An unexpected error occurred on a send
, make sure you have .Net Framework 4.5 or later installed. Also, try to enable TLS 1.2 protocol by running the following command:[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
{: codeblock}
{: #cli-private-endpoints-download}
Use the following steps to install the latest stand-alone {{site.data.keyword.cloud_notm}} CLI:
-
Select the installer of your OS to begin the download. The following operating systems are supported: macOS X 64-bit, Windows™ 64-bit, Linux™ x86 64-bit, Linux™ LE 64-bit (ppc64le), and S/390 Linux™.
-
Run the installer:
- For Mac and Windows™, run the installer.
- For Linux™, extract the package and run the
install
script.
Installers
- Mac OS X 64 bit
- Windows™ 64 bit
- Windows™ 32 bit
- Linux™ 64 bit
- Linux™ 32 bit
- PowerLinux™ 64 bit
- S/390 Linux™ 64 bit
- Log in to {{site.data.keyword.cloud_notm}}:
ibmcloud login
{: codeblock}
Now, you're ready to manage {{site.data.keyword.cloud_notm}} resources. Enter ibmcloud help
to view the command descriptions.
If you're using a federated ID, log in with a one-time passcode or an API key. {: tip}
If you want to install these packages from previous releases, follow this template to construct the private endpoint link of the package that you want to download, replacing release_tag with the release version that you want to download.
To view previous releases, access the official ibm-cloud-cli-releases GitHub repository.
Mac OS X 64 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>.pkg
{: codeblock}
Windows™ 64 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_amd64.exe
{: codeblock}
Windows™ 32 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_386.exe
{: codeblock}
Linux™ 64 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_amd64.tar.gz
{: codeblock}
Linux™ 32 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_386.tar.gz
{: codeblock}
PowerLinux™ 64 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_ppc64le.tar.gz
{: codeblock}
S/390 Linux™ 64 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_s390x.tar.gz
{: codeblock}
{: #install-private-custom-dir}
When you use installers or a shell script to install the {{site.data.keyword.cloud_notm}} CLI, it is installed in your system directories. If you want to specify a different directory, use the following steps.
If you install the {{site.data.keyword.cloud_notm}} CLI to a custom directory, the ibmcloud update
command can't be used to update the CLI.
{: important}
-
Select the matching binary of your platform to begin the download. The following platforms are supported: macOS, linux32, linux64, ppc64le, win32, win64, and s390x.
-
Extract the package to a directory that you specify.
You can see the following extracted content:
For Linux™ and Mac:
IBM_Cloud_CLI ├── LICENSE ├── NOTICE ├── autocomplete │ ├── bash_autocomplete │ └── zsh_autocomplete └── ibmcloud
{: screen}
For Windows™:
IBM_Cloud_CLI ├── LICENSE ├── NOTICE └── ibmcloud.exe
{: screen}
-
Add to the
PATH
environment variable and enable shell autocompletion.
- Add the
{YOUR_DIRECTORY}/IBM_CLOUD_CLI
to thePATH
environment variable. - For shell autocompletion support (Mac and Linux™ only), see Enabling shell autocompletion for IBM Cloud CLI.
Binary files
- Mac OS X 64 bit
- Windows™ 64 bit
- Windows™ 32 bit
- Linux™ 64 bit
- Linux™ 32 bit
- PowerLinux™ 64 bit
- S/390 Linux™ 64 bit
If you want to install binaries from previous releases, follow this template to construct the private endpoint link of the binary that you want to download, replacing release_tag with the release version that you want to download.
To view previous releases, access the official ibm-cloud-cli-releases Github repository.
Mac OS X 64 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_macos.tgz
{: codeblock}
Windows 64 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_windows_amd64.zip
{: codeblock}
Windows 32 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_windows_386.zip
{: codeblock}
Linux 64 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_linux_amd64.tgz
{: codeblock}
Linux 32 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_linux_386.tgz
{: codeblock}
Power Linux 64 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_linux_ppc64le.tgz
{: codeblock}
System/390 Linux 64 bit
https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_linux_s390x.tgz
{: codeblock}
{: #cli-private-endpoints-using}
For instructions on how to use private endpoints in the CLI, and to view the list of commands that support private endpoints, see Logging in to the CLI with a private endpoint
{: #cli-private-endpoints-related}
For more information, see Securing your connection when using the {{site.data.keyword.cloud_notm}} CLI.