The SAP instructions don't always have the macos instructions. This is pretty standard on the macos side, but if unable to connect SSH to the HANA server, please read below.
You need to pull files from the HANA Express Server
In your terminal application (bash or zsh), issue the command:
ls -al ~/.ssh
If nothing exists then follow these instructions, otherwise skip to next section:
Create the directory for your keys. Note the .ssh directory does not show up in Finder unless you allow for hidden files. For terminal you need to ls -a
to see dot notation files.
cd ~
mkdir .ssh
cd .ssh
Only do this if you do not have a .ssh diretory and had to create it. Generate your key. The ideal key strength is currently 4096, however not all servers accept the larger key.
For 4096
ssh-keygen -t rsa -b 4096 -C "[email protected]"
For 2048
ssh-keygen -t rsa -b 2048 -C "[email protected]"
Press enter to accept the defaults as your first keys should default to id_rsa.pub and id_rsa. If you do this again, you will need to set a different name. Be careful not to create too many keys, do not delete keys, as it is difficult to manage them, and if you delete a key and it was used, you no longer can access what the key was used for (possible ever).
To view the keys
cd ~\.ssh
ls -al
Then add your keys to the ssh agent
eval "$(ssh-agent -s)"
If macos version 12.2 (Sierra) or later
Check if you have a config file
cd ~\.ssh
ls -al
If config file exists then modify as below or if it doesn't exist create it:
touch config
nano config
Modify file to say:
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
Add you key to ssh agent
ssh-add -K ~/.ssh/id_rsa
If server rejects your key, it is probably due to permissions on your .ssh directory and key files.
For the .ssh directory the permissions should be drwx-----
or 0700
For the public key -rw-r--r--
or 0644
For the private key -rw-------
or 0600
To connect to the HANA Express server. You first need an account on the server, as the systems administrator to set you up with a LINUX id. Instructions:
Different distros might have different instructions here. For RHEL 7 or CENTROS 7:
adduser [user id]
psswrd [user id]
usermod -aG wheel [user id]
Google "[your linux distro] create sudo user" if you are on another distro for instructions.
Cyberduck is the open source file transfer program, that has SSH ability. Download here
File>Open Connection Select from drop down SFTP (SSH File Transfer Profile) Put in the server name of HANA Express instance and port 22 Use user name and password for the LINUX system above where you created user.
Click on add to keychain
You should not have to identify the private key location, as you registered that above, if that doesn't work then on second attempt, put in the private key file.
CONNECT
Depends on which SAP HANA express was installed (use grep to search)
/hana/shared/INSTALL/DATA_UNITS
Find File and Right Click and Download.