user-1: Its mentioned that -rpcconnect can be used to send commands to a remote Bitcoin Core node: https://github.com/bitcoin/bitcoin/blob/master/src/bitcoin-cli.cpp#L70
I am testing this option by using the format mentioned here: https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/14_1_Verifying_Your_Tor_Setup.md
torify bitcoin-cli -rpcconnect=vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion -rpcport=1309 -rpcpassword=password3 getblockchaininfo

If I use the onion address for my node returned in getnetworkinfo, I get the below error:
error: Could not connect to the server vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion:1309 (error code 1 - "EOF reached")

and If I use the onion address saved in /var/lib/tor/other_hidden_service/hostname, I get this error:
error: Authorization failed: Incorrect rpcuser or rpcpassword

I am assuming connection works fine in second error but issues with rpc credentials. Below are contents of bitcoin.conf:
testnet=1
prune=1000

server=1

listen=1
proxy=127.0.0.1:9050
torcontrol=127.0.0.1:9051
debug=tor

test.rpcport=18332

test.rpcuser=user3
test.rpcpassword=password3


user-1: -rpcuser was missing in the command. Also, the onion address exposed through getnetworkinfo is irrelevant. Bitcoin Core is only automatically setting up an onion service for P2P communication, not RPC.
Below command works fine:
torify bitcoin-cli -rpcconnect=vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion -rpcport=1309 -rpcuser=user3 -rpcpassword=password3 getblockchaininfo


-1: <p>Its mentioned that <code>-rpcconnect</code> can be used to send commands to a remote Bitcoin Core node: <a href="https://github.com/bitcoin/bitcoin/blob/master/src/bitcoin-cli.cpp#L70" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/bitcoin-cli.cpp#L70</a></p>
<p>I am testing this option by using the format mentioned here: <a href="https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/14_1_Verifying_Your_Tor_Setup.md" rel="nofollow noreferrer">https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/14_1_Verifying_Your_Tor_Setup.md</a></p>
<pre><code>torify bitcoin-cli -rpcconnect=vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion -rpcport=1309 -rpcpassword=password3 getblockchaininfo
</code></pre>
<p>If I use the onion address for my node returned in <code>getnetworkinfo</code>, I get the below error:</p>
<pre><code>error: Could not connect to the server vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion:1309 (error code 1 - &quot;EOF reached&quot;)
</code></pre>
<p>and If I use the onion address saved in <em>/var/lib/tor/other_hidden_service/hostname</em>, I get this error:</p>
<pre><code>error: Authorization failed: Incorrect rpcuser or rpcpassword
</code></pre>
<p>I am assuming connection works fine in second error but issues with rpc credentials. Below are contents of <code>bitcoin.conf</code>:</p>
<pre><code>testnet=1
prune=1000

server=1

listen=1
proxy=127.0.0.1:9050
torcontrol=127.0.0.1:9051
debug=tor

test.rpcport=18332

test.rpcuser=user3
test.rpcpassword=password3
</code></pre>
 -1: <p><code>-rpcuser</code> was missing in the command. Also, the onion address exposed through <code>getnetworkinfo</code> is irrelevant. Bitcoin Core is only automatically setting up an onion service for P2P communication, not RPC.</p>
<p>Below command works fine:</p>
<pre><code>torify bitcoin-cli -rpcconnect=vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion -rpcport=1309 -rpcuser=user3 -rpcpassword=password3 getblockchaininfo
</code></pre>
