I discovered that behaviour has changed in the latest version of Bitcoin core; the bitcoin.conf in the testnet3 directory is now ignored, your main bitcoin.conf file is used for testnet also (which could give problems if you don't swap a testnet version for the mainnet version correctly). Disregard that advice.
If it is a remote machine, I would remove that factor first. Download bitcoin to your own desktop and get familiar with its operation there. I just renamed my %appdata%\bitcoin directory on my windows machine to simulate a fresh install with the latest version.
1. with no data files whatsoever I get the expected error that server mode is not configured yet:
C:\Program Files\Bitcoin\daemon>bitcoind -testnet
Error: To use the "-server" option, you must set a rpcpassword in the configurat
ion file:
C:\Users\USERNAME\AppData\Roaming\Bitcoin\bitcoin.conf
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=7CUwmPZURcPQbFYbi42cAH1EbZrxF6NLYTTWpWpzF6wJ
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %s | mail -s "Bitcoin Alert" [email protected]2. I therefore made the recommended minimum
%appdata%\bitcoin\bitcoin.conf file:
server=1
rpcuser=bitcoinrpc
rpcpassword=7CUwmPZURcPQbFYbi42cAH1EbZrxF6NLYTTWpWpzF6wJ
3. Ran again, works as expected, the command window sits there after running:
C:\Program Files\Bitcoin\daemon>bitcoind -testnet4. In a new command window, lets watch the blocks get downloaded with some example commands:
C:\Program Files\Bitcoin\daemon>bitcoind -testnet getblockcount
79908
C:\Program Files\Bitcoin\daemon>bitcoind -testnet getblockcount
79969
5. Shut the Bitcoin server down the right way through a remote command:
bitcoind -testnet stop6. Then I also add testnet=1 to bitcoin.conf, and all the above work the same when I remove "-testnet" from all command lines above.
If following this example to-the-letter works on your local computer, duplicate on the remote computer: rename the .bitcoin directory and make a new one, create the four-line config file, and run your bitcoin commands with the latest version of bitcoin. For remote testing, don't try to put the first bitcoind in daemon mode or in the background, just open another ssh terminal to run the second copy. The only thing remaining would be that the ISP is interfering with ports on the remote machine or bitcoin isn't able to run correctly on that box for technical or software library reasons.