<divid="app"><!--[--><divclass="theme-container"><!--[--><headerclass="navbar"><divclass="toggle-sidebar-button"title="toggle sidebar"aria-expanded="false"role="button"tabindex="0"><divclass="icon"aria-hidden="true"><span></span><span></span><span></span></div></div><span><ahref="/en/"class=""><!----><spanclass="site-name can-hide">arthas</span></a></span><divclass="navbar-items-wrapper"style=""><!--[--><!--]--><navclass="navbar-items can-hide"><!--[--><divclass="navbar-item"><ahref="/en/"class=""aria-label="HOME"><!--[--><!--]--> HOME <!--[--><!--]--></a></div><divclass="navbar-item"><aclass="external-link"href="/doc/arthas-tutorials.html?language=en&id=arthas-basics"rel="noopener noreferrer"target="_blank"aria-label="ONLINE TUTORIALS"><!--[--><!--]--><span>ONLINE TUTORIALS</span><span><svgclass="external-link-icon"xmlns="http://www.w3.org/2000/svg"aria-hidden="true"focusable="false"x="0px"y="0px"viewbox="0 0 100 100"width="15"height="15"><pathfill="currentColor"d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygonfill="currentColor"points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><spanclass="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><divclass="navbar-item"><ahref="/en/doc"class="router-link-active"aria-label="DOCS"><!--[--><!--]--> DOCS <!--[--><!--]--></a></div><divclass="navbar-item"><divclass="navbar-dropdown-wrapper"><buttonclass="navbar-dropdown-title"type="button"aria-label="SOLUTIONS"><spanclass="title">SOLUTIONS</span><spanclass="arrow down"></span></button><buttonclass="navbar-dropdown-title-mobile"type="button"aria-label="SOLUTIONS"><spanclass="title">SOLUTIONS</span><spanclass="right arrow"></span></button><ulstyle="display:none;"class="navbar-dropdown"><!--[--><liclass="navbar-dropdown-item"><aclass="external-link"href="https://cn.aliyun.com/product/aliware/mse?spm=arthas.topbar.0.0.0"rel="noopener noreferrer"target="_blank"aria-label="Microservice solutions"><!--[--><!--]--><span>Microservice solutions</span><span><svgclass="external-link-icon"xmlns="http://www.w3.org/2000/svg"aria-hidden="true"focusable="false"x="0px"y="0px"viewbox="0 0 100 100"width="15"height="15"><pathfill="currentColor"d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygonfill="currentColor"points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><spanclass="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></li><liclass="navbar-dropdown-item"><aclass="external-link"href="https://www.aliyun.com/aliware/txc?spm=arthas.topbar.0.0.0"rel="noopener noreferrer"target="_blank"aria-label="Distributed transaction solutions"><!--[--><!--]--><span>Distributed transaction solutions</span><span><svgclass="external-link-icon"xmlns="http://www.w3.org/2000/svg"aria-hidden="true"focusable="false"x="0px"y="0px"viewbox="0 0 100 100"width="15"height="15"><pathfill="currentColor"d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygonfill="currentColor"points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><spanclass="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></li><liclass="navbar-dropdown-item"><aclass="external-link"href="https://www.aliyun.com/product/ahas?spm=arthas.topbar.0.0.0"rel="noopener noreferrer"target="_blank"aria-label="High-availability solution"><!--[--><!--]--><span>High-availability solution</span><span><svgclass="external-link-icon"xmlns="http://www.w3.org/2000/svg"aria-hidden="true"focusable="false"x="0px"y="0px"viewbox="0 0 100 100"width="15"height="15"><pathfill="currentColor"d="M1
</code></pre><divclass="line-numbers"aria-hidden="true"><divclass="line-number"></div></div></div><ul><li><p>The user can be specified by the <code>--username</code> option, the default value is <code>arthas</code>.</p></li><li><p>You can also configure username/password in <code>arthas.properties</code>. The priority of the command line is higher than that of the configuration file.</p></li><li><p>If only <code>username</code> is configured and no <code>password</code> is configured, a random password will be generated and printed in <code>~/logs/arthas/arthas.log</code></p><divclass="language-text ext-text line-numbers-mode"><preclass="language-text"><code>Using generated security password: 0vUBJpRIppkKuZ7dYzYqOKtranj4unGh
</code></pre><divclass="line-numbers"aria-hidden="true"><divclass="line-number"></div></div></div></li></ul><h3id="local-connection-does-not-require-authentication"tabindex="-1"><aclass="header-anchor"href="#local-connection-does-not-require-authentication"aria-hidden="true">#</a> Local connection does not require authentication</h3><p>By default, there are configurations in the <code>arthas.properties</code> file:</p><divclass="language-text ext-text line-numbers-mode"><preclass="language-text"><code>arthas.localConnectionNonAuth=true
</code></pre><divclass="line-numbers"aria-hidden="true"><divclass="line-number"></div></div></div><p>When the password is configured, connect from localhost, the authentication is not required. The default configuration value is true, which is convenient for local connection. Authentication is only required when connecting remotely.</p><h3id="authenticate-in-the-telnet-console"tabindex="-1"><aclass="header-anchor"href="#authenticate-in-the-telnet-console"aria-hidden="true">#</a> Authenticate in the telnet console</h3><p>After connecting to arthas, directly executing the command will prompt for authentication:</p><divclass="language-bash ext-sh line-numbers-mode"><preclass="language-bash"><code><spanclass="token punctuation">[</span>arthas@37430<spanclass="token punctuation">]</span>$ <spanclass="token builtin class-name">help</span>
Error<spanclass="token operator">!</span><spanclass="token builtin class-name">command</span> not permitted, try to use <spanclass="token string">'auth'</span><spanclass="token builtin class-name">command</span> to authenticates.
</code></pre><divclass="line-numbers"aria-hidden="true"><divclass="line-number"></div><divclass="line-number"></div></div></div><p>Use the <code>auth</code> command to authenticate, and you can execute other commands after success.</p><divclass="language-text ext-text line-numbers-mode"><preclass="language-text"><code>[arthas@37430]$ auth ppp
Authentication result: true
</code></pre><divclass="line-numbers"aria-hidden="true"><divclass="line-number"></div><divclass="line-number"></div></div></div><ul><li>The user can be specified by the <code>--username</code> option, the default value is <code>arthas</code>.</li></ul><h3id="web-console-authentication"tabindex="-1"><aclass="header-anchor"href="#web-console-authentication"aria-hidden="true">#</a> Web console Authentication</h3><p>Open the browser, there will be a pop-up window prompting you to enter your username and password.</p><p>After success, you can directly connect to the web console.</p><h3id="http-api-authentication"tabindex="-1"><aclass="header-anchor"href="#http-api-authentication"aria-hidden="true">#</a> HTTP API Authentication</h3><h4id="http-authorization-header-recommended"tabindex="-1"><aclass="header-anchor"href="#http-authorization-header-recommended"aria-hidden="true">#</a> HTTP Authorization Header(recommended)</h4><p>Arthas uses the HTTP standard Basic Authorization.</p><ul><li>Reference: <ahref="https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication"target="_blank"rel="noopener noreferrer">https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication<span><svgclass="external-link-icon"xmlns="http://www.w3.org/2000/svg"aria-hidden="true"focusable="false"x="0px"y="0px"viewbox="0 0 100 100"width="15"height="15"><pathfill="currentColor"d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygonfill="currentColor"points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><spanclass="external-link-icon-sr-only">open in new window</span></span></a></li></ul><p>For example, if the user name is: <code>admin</code> and the password is <code>admin</code>, the combination is a string: <code>admin:admin</code>, the base64 result is: <code>YWRtaW46YWRtaW4=</code>, then the HTTP request adds the <code>Authorization</code> header:</p><divclass="language-bash ext-sh line-numbers-mode"><preclass="language-bash"><code><spanclass="token function">curl</span><spanclass="token string">'http://localhost:8563/api'</span><spanclass="token punctuation">\</span>