Configure SSH Key-Based Authentication on a Linux and Mac

2017.08.24

How To Create SSH Keys

The first step to configure SSH key authentication to your server is to generate an SSH key pair on your local computer.

To do this, we can use a special utility called ssh-keygen, which is included with the standard OpenSSH suite of tools. By default, this will create a 2048 bit RSA key pair, which is fine for most uses.

On your local computer, generate a SSH key pair by typing:
ssh-keygen

The utility will prompt you to select a location for the keys that will be generated. By default, the keys will be stored in the ~/.ssh directory within your user’s home directory. The private key will be called id_rsa and the associated public key will be called id_rsa.pub. Stick with the default location.

Copying your Public Key Using SSH-Copy-ID

The easiest way to copy your public key to the server is to use a utility called ssh-copy-id. For this method to work, you must already have password-based SSH access to your server.

Simply specify the remote host that you would like to connect to and the user account that you have password SSH access to. This is the account where your public SSH key will be copied.

The syntax is:
ssh-copy-id username@remote_host

Special thanks to https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server

Categories : Debian  OS X  Raspberry Pi  Ubuntu

Asterisk ARI Kicking User Out

2011.11.09

When ARI kicks a person out or the voicemails are not playing when requested. Check the directory authorizations.

chown asterisk:asterisk /var/lib/php/session

Categories : Debian  Asterisk

Xen Failed to find an unused loop device

2011.09.13

Create a new Xen instance yesterday and had issues getting it started. Already have 4 instances running and the error message “Failed to find an unused loop device” kept appearing.

I could shutdown another instance and bring the new one up, but then the instance I had shutdown would not come back up and had the same error.

Luckily, I ran across the following post that provided all the information.
http://denraelevisgniht.blogspot.com/2011/01/failed-to-find-unused-loop-device.html

I created file /etc/modprobe.d/local-loop with one line.
options loop max_loop=64

After reboot, all instances would come up without a problem.

Categories : Debian  Debian  Xen

Asterisk 1.8 – installation

2011.09.06

Go to your src directory
cd /usr/src
Download current Asterisk 1.8
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8-current.tar.gz
Unpack it
tar xvfz asterisk-1.8-current.tar.gz
Go down to asterisk unpacked files directory
NOTE: You need to do a ls -l to see the directory created from the tar.
This is the latest release
cd asterisk-1.8-current
Download mp3 support files
contrib/scripts/get_mp3_source.sh
Run configure
./configure
Start menu based configuration
make menuconfig
select app_mysql, app_saycountpl, cdr_mysql, format_mp3, res_config_mysql
go to Extras Sound Packages
Select EXTRAS-SOUNDS-EN-GSM
Save & Exit
Run make
make
Then run the installer
make install
Stop running Asterisk
amportal stop
And start the new Asterisk 1.8
amportal start

Thanks to the following:
http://www.freepbx.org/forum/freepbx/installation/asterisk-1-8-installation

Categories : Debian  Asterisk

Java version of SAP GUI available from SAP

2010.04.27

If you are looking for the latest version of the java SAP GUI, the link is below.

ftp://ftp.sap.com/pub/sapgui/java/

Categories : Debian  OS X  SAP  OS X  Snow Leopard  Ubuntu
Tags :                   

WebEx on Ubuntu 9.10 Karmic

2009.12.22

To get WebEx running on Ubuntu UNR 9.10 Karmic the following commands were run in Terminal.

1. sudo apt-get install ubuntu-restricted-extras
2. Install libstdc++5 from the following location
http://packages.debian.org/lenny/i386/libstdc++5/download

Categories : Debian
Tags :   

Use SSH key to access Debian from Mac OS X

2009.12.07

1. Open the OS X Terminal application

2. cd .ssh
If directory .ssh does not exist then mkdir .ssh

3. Generate SSH keys
ssh-keygen
Enter file in which to save the key (/User/xxxxx/.ssh/id_rsa): recommend leaving blank
Enter passphrase (empty for no passphrase): recommend entering passphrase
Enter same passphrase again:
Your identification has been saved in /Users/xxxxx/.ssh/id_rsa.
Your public key has been saved in /Users/xxxxx/.ssh/id_rsa.pub.

5. Access the .ssh directory on the server
cd /home/xxxxx/.ssh/
If directory .ssh does not exist then mkdir .ssh
chmod 700 /home/xxxxx/.ssh

4. Upload your public key to the server
Upload your id_rsa.pub to /home/xxxxx/.ssh/

5. Create the authorized_keys file
cat id_rsa.pub >> authorized_keys

Categories : Debian  OS X  OS X  Snow Leopard
Tags :       

Using a GoDaddy SSL Certificate with Openfire on Debian

2009.12.07

1.  Copy your key and cert to the /etc/openfire/security directory on the server
certkey.com.key
certpub.com.crt

2.  cd /etc/openfire/security

3.  Convert your key and cert to DER format in the root directory:

openssl pkcs8 -topk8 -nocrypt -in certkey.com.key -inform PEM -out certkey.key.der -outform DER
openssl x509 -in certpub.com.crt -inform PEM -out certpub.com.crt.der -outform DER

4.  Get some java utilities and place in the /etc/openfire/security directory to create a java key store from AgentBob
http://www.agentbob.info/agentbob/79.html
ImportKey.java, ImportKey.class

5.  Stop Openfire
/etc/init.d/openfire stop

6.  Backup your existing keystore
mv keystore keystore.old

7.  Create a new keystore (in root directory keystore.ImportKey):
java ImportKey certkey.com.key.der certpub.com.crt.der

8.  Change the keytool passwords back to the defaults (from ‘importkey’ to ‘changeit’)
keytool -storepasswd -keystore /root/keystore.ImportKey
keytool -keypasswd -alias importkey -keystore /root/keystore.ImportKey

9.  Download the the GoDaddy Intermediate Certificate to the /etc/openfire/security directory
wget –no-check-certificate https://certificates.godaddy.com/repository/sf_issuing.crt into the
keytool -import -alias intermed -file sf_issuing.crt -keystore /root/keystore.ImportKey -storepass changeit -trustcacerts

10.  Move the keystore to /etc/openfire/security
mv /root/keystore.ImportKey /etc/openfire/security/keystore

11.  Start Openfire
/etc/init.d/openfire start

Special thanks to http://www.lovelysystems.com/importing-an-existing-ssl-certificate-to-openfire/