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

Mac OSX applications won’t start after cloning or time machine restore

2012.06.20

I cloned a drive on the Mac Mini and when the clone started up everything looked in order. However, some apps were giving warnings or dumping when they started.

Twitter for Mac would ask for credentials and then fail.
MS Office 2011 kept giving a warning about the database.
Firefox was missing a profile.

Permissions seemed to be the culprit and then I ran across this forum thread. http://support.mozilla.org/my/questions/785562

The fix was as easy as:
Run this command in terminal from your home directory
sudo chown -R `id -un`:`id -gn` ~

Categories : OS X
Tags :   

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 :                   

Mac OS X Java Update 10.6 Update 1 and Juniper SSL/VPN

2009.12.21

After running the java update on my Mac OS X Snow Leopard, I started receiving an error about a missing certificate. The company I work with utilizes client SSL certificates during the Juniper authorization process.

1. To rectify the error, I made the following entry in Terminal.

sudo keytool -storepasswd -new changeit -keystore /System/Library/Frameworks/JavaVM.framework/Resources/Deploy.bundle/Contents/Home/lib/security/cacerts -storepass changeme

2. I was then asked for my Mac user id password as I am an administrator user on the Mac.

3. Please note that you may have to reboot for the change to apply.

Categories : OS X  OS X  Snow Leopard

Mac OS X Snow Leopard and Juniper SSL/VPN

2009.12.21

If you have been using Juniper VPN on Mac OS X Leopard and you upgrade to Mac OS X Snow Leopard, you will most likely have to modify the permissions a folder and create a new folder.

Run the following sudo commands in terminal
1. cd /usr/local/juniper/nc/
Identify the version, in my case it is 6.0.0

2. sudo chmod 755 6.0.0
3. sudo mkdir ‘/Applications/Network Connect.app/Contents/Frameworks’

That should be it. Juniper SSL should be working again without an issue.

Categories : OS X  OS X  Snow Leopard

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 :