Monthly Archives: January 2017

Connect by ssh without password

How to configure server and client for SSH authentication without password.

  1. On client generate a new key

    You will be asked to enter passphrase and key file name. I entered empty passphrase and dmitry key name
  2. On client copy generated key to ~/.ssh folder
  3. On client use ssh-copy-id command for adding generated pub key to server’s authorized keys.
  4. On client edit ~/.ssh/config or create if not exists. Add following lines:
  5. On server, if you need to connect as root without password too, edit /etc/ssh/sshd_config, say yes to PermitRootLogin

    Then restart ssh

    Run visudo and edit line, starting from %sudo
  6. Now you can connect server without password

Hive2 metastore configuring

By default, hive runs with embedded derby metastore, which allows only one connection. This article is about how to hive with derby network server. Assume hive is installed to /opt/hive folder

  1. Download derby to /opt/derby folder
  2. Start derby server nohup /opt/derby/bin/startNetworkServer &
  3. Edit /opt/hive/conf/hive-site.xml
  4. Start derby
  5. Init metastore
  6. Start hiveserver2 and beeline, should work both simultaneously

    and check in browser http://localhost:10002