How To Build A Emercoin EMC Mining Computer
EmcSSH EmcSSH is a system for (PKI) and (ACL) management on the blockchain. It is possible to create a bridge between and the Emercoin cryptocurrency's blockchain. The result is a comfortable, safe and very flexible way to log in to multiple servers using the SSH protocol. A simple program provides a bridge between OpenSSH and the Emercoin blockchain, allowing for secure, decentralized management of PKI.
When OpenSSH is configured to refer to emcssh, the program will query the Emercoin blockchain to retrieve SSH credentials during the authentication process. Users can manage their own login credentials (public keys) by submitting and modifying records in the EMC blockchain (using the standard Emercoin GUI or command-line daemon. Similarly, admins can manage user groups for their services that may contain references to other groups as well as individual users - allowing for the creation of recursive authentication trees. EmcSSH operates under the 'ssh' service abbreviation in the. Records are considered secure and unalterable due to the. Installation Below are instructions for installing and configuring emcssh on Debian and derivative servers such as Ubuntu, and then using emcssh to log in to the server from a client computer.
We assume that your server is already running the Emercoin wallet. Installing the necessary packages on the server First upgrade the existing software: $ apt-get update $ apt-get dist-upgrade Now install curl and jansson: $ apt-get install libcurl4-openssl-dev libjansson-dev Next, you need to download and install the latest: $ wget (change to whatever is the latest release) $ tar xfz 0.0.4.tar.gz $ cd emcssh-0.0.4 $ make $ make install Setting up EmcSSH Now you need to edit the config file /usr/local/etc/emercoin/emcssh.conf and change the setting for emcurl. Settings need to match those in your emercoin.conf file. $ nano /usr/local/etc/emercoin/emcssh.conf Change the value for emcurl: emcurl The values for emccoinrpc and rpcpassword should be taken from your emercoin.conf file. Other parameters can be left as is. Important: the emcssh.conf file should have permissions set to read and write only by the root user.
Do not change the permissions on this file as it contains the rpcpassword. Next, you need to edit the sshd config file, but Debian has a small problem in that the sshd version may be too old and first needs to be updated.
Users of other operating systems can skip the next step. Update OpenSSH on Debian For starters find out what version of OpenSSH is installed: $ sshd -v In response, we get the following message: unknown option -- v OpenSSH_6.1p1 Debian If the version is 6.2 or above, the next step can be skipped. Otherwise, update: $ nano /etc/apt/sources.list Add to the end of the line and save the file: $ deb wheezy-backports main non-free contrib Update the system: $ apt-get update and install sshd: $ apt-get -t wheezy-backports install openssh-server The installation script asks whether to disable password authentication. The best response is not to be able to log in the traditional way.
In addition, users of Debian will need to change the file location emcssh: $ mv /usr/local/sbin/emcssh /usr/sbin/emcssh Configure OpenSSH Now we need to edit the configuration file sshd_config: $ nano /etc/ssh/sshd_config It is necessary to add some lines: For Debian: AuthorizedKeysCommand /usr/sbin/emcssh AuthorizedKeysCommandUser root For other operating systems: AuthorizedKeysCommand /usr/local/sbin/emcssh AuthorizedKeysCommandUser root Now, restart sshd with the new configuration: $ kill -HUP `cat /var/run/sshd.pid` Generate an SSH key pair Now we need to generate a key pair for a user. In Linux, simply type the following command: $ ssh-keygen -t rsa -b 4096 -C '@your-username' If the user is running Windows, we recommend using.
MINING GUIDE. HOME 首页; News. You can mine EMC using SHA-256 ASIC miners in mining pools or in solo mode. Note that mining Emercoin with CPU or GPU is no longer. Before we begin, let's understand a few things about PoS with Emercoin: EMC blocks are mined approx. Every 10 minutes. The chance of mining a block with PoS is related to the amount of EMC you hold. Coins must sit unspent in the EMC address for 30 days to become eligible for staking. ZCoin XZC Mining Farm more. Maximum staking weight (chances of staking) is reached after 90 days. When it comes to digital currencies, there are few that offer a full bouquet of services customers can actually get value out of. Emercoin is a promising name in the. EMC Mining Kit. Run The Miner Control Panel With Built-in Wallet And Other Buns. To install the required mini-PC Paspberry Pi. Cd /home/emc/.emercoin/.
Run PuTTYgen, change the number of bits to 4096 and click Generate. Wave the mouse cursor on the screen during key generation, after which you should see something like this: Click Save Private Key and store the key on your computer. Password protection is not needed, therefore, you can agree to save without a password. Add the public key to the Emercoin NVS Next, we need to add the public key (highlighted for Windows in the picture above) to the as a name->value pair. Do this in your Emercoin wallet on your PC.
In the name field, specify: ssh: In the value field paste your public key from PuTTYgen. The new address field can be left blank. Specify the number of days, and click Submit. Now we need to wait for confirmation of our transaction. To save time while waiting for confirmation, you can now go back to your server, and add a new user to the file emcssh_keys: $ cd $HOME/.ssh/ $ nano emcssh_keys In the document, simply add your user with @. In my case it is: @kamillo Save and close the file. It should be noted that Emercoin's EmcSSH technology allows not only individual users, but also entire groups.
Let's say you want to give three other people access to your servers. You could individually add all users to the emcssh_keys file, but it is inconvenient, because every time you add or remove a user you will need to edit this file on all servers. However, there is a more versatile and easy way. Simply create an entry in the Emercoin blockchain, for example kamilloFriends and list all your friends. The fields for such an entry are as follows: 'name': 'ssh:kamilloFriends' 'value': '@kamillo @friend1 @friend2 @friend3' If you need to add or remove someone from the group, it will be enough to make a Name_Update on this entry in the Emercoin wallet.
Thus, if in the file emcssh_keys I specify the group @kamilloFriends, the system can authorize any of my friends. Operability test To make sure that everything works as expected, run the following command: $ emcssh On my test server I work from the root user, so the command for my username would be: $ emcssh root In response, we get the following message: #INFO: verbose=2; maxkeys=4096 recursion=30 emcssh_keys=/root/.ssh/emcssh_keys;:8775/ #Path=/ #Path=/kamillo/ ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAgEAgmzL.. Perfectly as expected. Everything works. Now let's try to log in. Without closing the current session, authorize PuTTY to log in without a password. To do this, open a new PuTTY window, enter the IP address of your server then navigate to SSH >Auth in PuTTY: Click Browse.
And specify the path to your private key. On the tab Connection >Data we can specify the user under which we want to connect. If not specified, don't worry - in this case the server will ask for the user name when you connect. Click Open and connect to the server.
If it connects then congratulations, you have succeeded! If the connection fails for some reason, open the window of the previous session and enter the following command: $ cat /var/log/auth.log Look carefully for any error messages there and seek solutions to the problem. And if you can't fix it, please ask for help. Finally, here's another useful command, which shows when visitors log in: $ grep 'Accepted publickey' /var/log/auth.log Supplementary info for MacOS X users To be able to log in to an EmcSSH enabled server via the terminal in OS X, you first need to convert your private key to the desired format.
I did the conversion in Windows through the program PuTTYgen. It is better to set a password for your key since OS X will complain about it (in the future you will need to enter your password only once). Run PuTTYgen, click Load and choose our key *.ppk. Next, set a password in Key passphrase and Confirm passphrase. Go to the tab Conversions and export key in the format of OpenSSH: Now we want to add the key to the OS X system. Open a terminal and navigate to the folder where you exported the key.
I have a folder named Keys: $ cd Keys Set the key as read-only, otherwise the system will complain: $ chmod 0400 Add the key: $ ssh-add In response, we receive a message that an identifier was added. Check the connection with the command: $ ssh If the server does not ask for a password, then all is well. More info • See the following article on medium:.
Proof-of-Stake block generation By holding EMC in your wallet, you can assist the Emercoin network to verify/broadcast transactions by generating new blocks with Emercoin's (PoS) system. When PoS blocks are generated, the wallet that generated the block is rewarded with additional EMC. Earnings from PoS are at the rate of approx. The process of generating blocks with Proof-of-Stake is loosely referred to as minting. EMC coin age maturity is 30 days.
This means, the (Unspent Transaction Output) that added the EMC to your balance must sit unspent for 30 days before it becomes eligible to generate a PoS block. Proof-of-Stake guide This guide covers how to mint (PoS) blocks with an encrypted wallet on your own computer using the Emercoin GUI. Note that it is also possible to mint PoS blocks on a headless server with the Emercoin daemon (see walletpassphrase command below). Before we begin, let's understand a few things about PoS with Emercoin: • EMC blocks are mined approx.
Every 10 minutes. • The chance of mining a block with PoS is related to the amount of EMC you hold. • Coins must sit unspent in the EMC address for 30 days to become eligible for staking. • Maximum staking weight (chances of staking) is reached after 90 days. • To have the chance to mine a block with PoS, the wallet must be unlocked for minting, as described below.
• Staking correctly will generate approx. 6% interest p.a. The PoS reward for minting a block is based on coin age. Follow these steps to mine PoS blocks using the GUI: • Encrypt your wallet: To encrypt your wallet, choose 'Encrypt Wallet' from the Settings menu and choose a strong password that you won't forget. After your wallet is encrypted, a locked padlock icon appears at the bottom of the window. • Unlock your wallet in Mint-only mode: Click the padlock icon at the bottom of the window, check the 'Mint only mode' checkbox and enter your password. When the wallet is unlocked, the padlock icon at the bottom of the window will appear unlocked.
While the wallet is in 'Mint only mode', you can safely leave it open without anyone being able to send funds out. • Leave your wallet unlocked and running in Mint-only mode: Coins only have a chance to stake while your wallet is open, and they sit untouched in the EMC address for 30 days. If you mint a PoS block, you will see your 'Stake' balance change for 32 blocks until the PoS transaction confirms. • When coins have staked successfully, you will see new transaction and new coins added to your balance. How often to run the client for staking?
You could unlock your wallet for minting for a few days each month, however in practice it's unlikely all your transaction 's are ready to stake at the same time. Therefore in the long term it is more pratical to leave the wallet running 24/7 to increase your chances of minting PoS blocks and to support the Emercoin network.
Checking your PoS statistics • There is PoS calculator provided. • Additional statistics particular to your EMC address are also available: • Visit the Emercoin blockchain explorer at and search for your EMC address(es) that are currently staking. • Run the staking calculator tool for your EMC address on (press the purple 'leaf' icon and you will see the results on your minting%, coin age, and several other variables). Preventing your wallet from staking While coins are staking they will not be accessible to spend. If you need to prevent an amount of EMC from staking, simply set reservebalance in your wallet's file.
E.g: reservebalance=1000 To prevent your wallet from staking at all, simply set reservebalance to be greater than your total EMC balance. Minting using the headless daemon If using the command line daemon instead of the GUI then you can unlock your wallet for minting using the walletpassphrase command: walletpassphrase 'passphrase' timeout [mintonly] e.g. To unlock for minting for 604800 seconds (1 week): $ emc walletpassphrase yourlongrandompassphrase 604800 true Troubleshooting tips • Check your expected PoS rewards at • Check your minting statistics for your EMC address (see above). • Ensure the EMC has been left unspent in your wallet for at least 30 days. • Ensure you have not set reservebalance in your wallet's file.
• See More info • See the following article on medium:.