To generate SSH keys in Mac OS X, follow these steps: Enter the following command in the Terminal window. Ssh-keygen -t rsa This starts the key generation process. When you execute this command, the ssh-keygen utility prompts you to indicate where to store the. Mac OS X includes a command-line SSH client as part of the operating system. To use it, goto Finder, and selext Go - Utilities from the top menu. Then look for Terminal. Terminal can be used to get a local terminal window, and also supports SSH connections to remote servers. The concept behind ssh -A are ssh agents. They run in the background and through the use of environment variables the agent can be located and automatically used for authentication when logging in to other machines using ssh. Have a look at the manpage of ssh-agent for more details. With Mac OS X, the ssh-agent should be started on demand.

I'm running Mac OS X, and it appears that after SSHing to several machines, using identity files, my 'ssh-agent' builds up a lot of identity / keys and then sometimes offers too many to a remote machine, causing them to kick me off before connecting. Received disconnect from 10.12.10.16: 2: Too many authentication failures for cwd. Initially when Mac OS X boots, ssh-agent(1) is not started. It is only when you perform your first ssh(1) (or related) command that launchd(8) invokes the following command: /usr/bin/ssh-agent -l. You can see launchd(8)‘s integration in-action by opening a Terminal immediately after booting your Mac.

if you have a VPS or a server running linux need to manage via SSH. On Windows you will have loads of options such as PuTTY, kitty, MobaXterm … but on MacOS majority are paid app to use.

But there are still free apps with great features that satisfy your needs. We list the 5 most prominent apps below.

1. Termius SSH client

Download: https://itunes.apple.com/jp/app/termius-ssh-client/id1176074088?l=en&mt=12

Termius is more than a mere SSH client – it’s a complete command-line solution that’s redefining remote access for sysadmins and network engineers. Securely access Linux or IoT devices and quickly fix issues from the comfort of your couch via laptop or phone.

Features:

  • Termius is available for all major mobile and desktop systems.
  • Enjoy a beautiful, hand-crafted interface.
  • Supports ECDSA and ed25519 keys as well as chacha20-poly1305 cipher.
  • Termius is always ad-free. You are not the product.
  • Pair credentials and servers for quick access.
  • Create groups to define shared settings and themes.
  • Tag your servers to stay organized.
  • Make it yours with 12 colorful themes and adjustable fonts.
  • Power through late night sessions with dark mode.
  • Make multiple connections to the same host or connect to multiple hosts.
  • Port forwarding lets you encrypt nearly any service or connection.

2. Core Shell – SSH Client 4+

Download:https://itunes.apple.com/jp/app/core-shell-ssh-client/id1354319581?l=en&mt=12

A full featured terminal with built-in OpenSSH support, it’s focused on managing and login to hosts efficiently. Don’t waste your time; be productive.

Features

Full-featured Terminal

  • Compatible with Terminal.app and xterm.
  • Supports ANSI 16 and 256 color palettes, as well as 24bit true color.
  • Passed cases of *vttest– a strict VT100/VT220/VT420 terminal functionality test suite.

OpenSSH Compatible

  • Everything in OpenSSH, agent forwarding, certificates, proxy jump, etc.
  • Can read your existing `ssh_config` file as the source of advanced options, especially helpful for experienced users.
  • Can work with GnuPG agent, YubiKey, Authy and Google Authenticator.

Ssh Agent For Mac Os X 10.7

Agent

Download/Upload

  • Upload files by dragging and dropping to the shell window.
  • Download remote files with single click on context menu or press a key combination.

Keychain Integration

  • Tightly integrated with macOS Keychain, don’t have to enter passwords or passphrases repeatedly.
  • It’s totally optionally, you can opt-in or opt-out at any time.

Advanced Options Editor

  • A handy way to tune per-host advanced options.
  • For every ssh directives, there is a contextual help provides immediate information, no more googling.

Automatic Reconnect

Ssh Agent On Windows

  • Always tries to restore your connections after network failure or waking up from sleep.

Theming

  • Eight built-in color schemes: Basic, Dracula, Grass, Homebrew, Man Page, Novel, Ocean, Red Sands
  • Our color optimization ensure that colorful text always clearly visible.

Tags

  • Use tags to organize your hundreds or thousands of hosts.
  • Tag your host by a simple drag & drop actions.

Premium Features

  • Unlimited number of connections
  • Importing and exporting
  • Sync hosts and tags between all of your Mac computers
  • Scriptable (automation with AppleScript and Automator)
  • Prioritized customer support

Premium License

  • USD 9.99 for 1-Year License
  • USD 29.99 for 4-Year License (save 25%)

3. SSH Proxy 4+

Download: https://itunes.apple.com/jp/app/ssh-proxy/id597790822?l=en&mt=12

SSH Proxy can help you turn any remote SSH server into a SOCKS / HTTPS proxy, intuitive and easy to use.

SSH Proxy is able to remember the SSH login password & private key passphrase and save it to OS X’s keychain. Furthermore, SSH Proxy is designed to automatically reconnect when your Mac is waking up from sleep.

Features:

  • Auto launch when log in OS X
  • Create HTTP, HTTPS, SOCKS4/4A and SOCKS5 proxy through SSH tunnel
  • Ability to share created proxy on LAN
  • Fast switch between multiple SSH accounts
  • Automatically reconnect after disconnected by errors or waking up from sleep
  • Remember SSH login password & private key passphrase in OS X Keychain automatically
  • Whitelist, only sites on the list will be accessed through the proxy server, other sites will be connected directly

SSH Functions:

  • Able to compress SSH connection
  • Connecting through SOCKS5 / SOCKS4 / HTTPS proxy with authentication
  • Support public-key, password, keyboard-interactive and multi-factor authentication methods
  • Support Google Authenticator and Authy for two-step verification
  • Support multi-factor authentication
  • Can deal with DSA, RSA, ECDSA, ed25519 private key types
  • RFC4716, PKCS#8 and PEM key formats are supported, compatible with OpenSSH

Note:

  • SSH Proxy supports SSH-2 protocol, the vulnerable and obsoleted SSH-1 is not supported. Most modern servers and clients support SSH-2.
  • You got to have a remote SSH server before downloading and using SSH Proxy, SSH Proxy does not provide you SSH service.

4. Zen Term Lite SSH Client 4+

Download:https://itunes.apple.com/jp/app/zen-term-lite-ssh-client/id1422475219?l=en&mt=12

Zen Term Lite is a powerful terminal emulator that supports SSH, ZModem, and provides various authentication methods. You can easily use it to connect to Linux, UNIX and Mac hosts.

Note: Zen Term lite edition doesn’t provide SFTP functionality, please use standard edition to get full experience.

Features:

Terminal

  • Supports VT100, XTERM, XTERM-256color terminal emulation.
  • Supports encoding and decoding character sets from multiple languages, including Chinese, Japanese and Korean multi-byte character sets.
  • The scrollback buffer can be configured to save up to 10,000 lines.

Security

  • Master password is encrypted and stored in Apple KeyChain, and connection passwords and passphrases are encrypted by master password, so that you don’t have to input password/passphrase repeatedly.
  • Supports RSA/DSA/ECDSA/ED25519 public key, password, and keyboard interactive user authentication.
  • User key generation: generate RSA/DSA/ECDSA/ED25519 private keys.
  • User key management: allows user keys to be viewed, generated, removed, imported and exported.
  • Host key management: allows host keys to be viewed, removed, imported and exported.

Appearence

  • Multiple terminal color schemes are provided, and you can create new color schemes with customized foreground, background, and ANSI colors.
  • Change font name and size.
  • Change cursor color, shape and blinking.
  • Supports the creation of multiple TAB groups, the app window can be splitted horizontally or vertically, and tabs can be dragged and dropped between TAB groups.
  • Force Touch can open a search engine or dictionary.
  • Supports macOS dark mode.
  • File transfers
  • Send and receives files via ZModem.
  • Drag and drop files and folders onto the shell session to start ZModem file transfers.

5. Core Tunnel – SSH Tunnel 2 4+

Download: https://itunes.apple.com/jp/app/core-tunnel-ssh-tunnel-2/id1354318707?l=en&mt=12

The missing ssh tunnel manager, compatible with OpenSSH, automatic and intuitive. Don’t waste your time; be productive.

Features:

  • OpenSSH Compatible
  • Everything in OpenSSH, local / remote / dynamic port forwarding types, agent forwarding, certificates, proxy jump, etc.
  • Can read your existing `ssh_config` file as the source of advanced options, especially helpful for experienced users.
  • Can work with GnuPG agent, YubiKey, Authy and Google Authenticator.
  • Keychain Integration
  • Tightly integrated with macOS Keychain, don’t have to enter passwords or passphrases repeatedly.
  • It’s totally optionally, you can opt-in or opt-out at any time.
  • Advanced Options Editor
  • A handy way to tune per-host advanced options.
  • For every ssh directives, there is a contextual help provides immediate information, no more googling.
  • Automatic Reconnect
  • Always tries to restore your connections after network failure or waking up from sleep.
  • Tunnels can be set to connect on app startup.
  • Menubar Icon
  • Control and monitor tunnels without switching out your current working window.
  • Tags
  • Use tags to organize your hundreds or thousands of tunnels.
  • Tag your tunnel by a simple drag & drop actions.

Premium Features

  • Unlimited number of connections
  • Importing and exporting
  • Sync hosts and tags between all of your Mac computers
  • Scriptable (automation with AppleScript and Automator)
  • Prioritized customer support

Premium License

  • USD 9.99 for 1-Year License
  • USD 29.99 for 4-Year License (save 25%)

We Choice: Zen Term Lite

Overview
There are several methods one can use to make sure ssh-agent is running for you and that other Aqua apps can take advantage of it. This describes the one I use, which is simply two files: one to setup the environment for all Aqua apps, and one which is automatically run when a Terminal (or xterm, or iTerm, etc) window is opened.

Environment
The important part of using ssh-agent is an environment variable, SSH_AUTH_SOCK, which points to a socket used to communicate with ssh-agent. What I do is set this in ~/.MacOSX/environment.plist to point to /Users/blb/tmp/ssh/ssh-agent.socket (which, for the paranoid like myself, should be in a directory readable only to the user, ie, mode 700 for /Users/blb/tmp/ssh).
Setting it involves writing the file environment.plist, which is a property list (hence the plist extension). The format is XML, and mine is as such:

This gets SSH_AUTH_SOCK in your environment on future logins. Be sure to restart Terminal (at least) so it can pick up the change. Of course, it doesn't do much until ssh-agent is running.
Running ssh-agent
ssh-agent itself needs to be running, and setting the environment variable doesn't help with that. The other step is to modify your login shell script to run one new script (which I've called check_ssh_agent) that runs ssh-agent if it isn't already running. This means that you do have to pop up a Terminal window once so your login shell script will run, but then no more worries. My check_ssh_agent is:

You'll note that my paranoia continues as, after ssh-agent is run, the script sets the socket to mode 600 for extra safety.
Once ssh-agent is running, you can run ssh-add to add whichever keys you use.
Caveats
There are a few issues which must be pointed out with this method. The first is the previously-mentioned one where you have to open a Terminal window to get ssh-agent running. For me, this is simple since I have Terminal running most of the time. For some, it may be a bit annoying. One solution to this would be to change the check_ssh_agent script to be a .command file and set that to be run on login (I haven't tested this method, however).
Another is that ssh-agent will continue to run after logout. Since the process is running with your ID, and is communicating through a socket to which only you have access, you only need to worry about others accessing your account, and root. But this also applies for the time while you are logged in as well, so it shouldn't be to major a concern. And if you don't trust root on your machine, you shouldn't be using sensitive passwords with any process on that machine. Besides, how often do you log out anyway?