Home  >  Article  >  System Tutorial  >  Password-free ssh settings for mac?

Password-free ssh settings for mac?

王林
王林forward
2024-02-16 08:36:07933browse

php editor Strawberry brings you an introduction to "Mac password-free ssh settings". SSH (Secure Shell) is a protocol for remote login and secure data transmission. In the Mac system, we can achieve password-free SSH login through some simple settings, and access remote servers or other devices conveniently and quickly. This article will introduce you in detail how to set up password-free SSH in Mac system to make your work more efficient and convenient.

Teach you step by step how to configure SSH multiple accounts on Mac

1. View the public key through cat ~/.ssh/id_rsa.pub, copy the entire public key, and configure it to the backend such as GitHub.

First, search for, download and install the Termius software in the App Store. After the installation is complete, open the application and enter the main page, click the [New Host] button in the lower right corner.

3. Configure iterm2 on Mac to remember the multi-site ssh account password. First, you need to install iterm2 yourself. After opening the iterm2 official website, click Download to download and install.

4. In the terminal (the root directory will do), enter ssh-keygen -t rsa -C email on gitlab.

Password-free ssh settings for mac?

How to establish an ssh connection on a mac computer, how to connect?

First we need to find the Termius software in the App Store, download and install it. After installation, open the software, enter the main page, and click the [New Host] button in the lower right corner.

Use the WIN Q key combination to open the search box, enter Remote Desktop Connection, and click the prompt below to open the connection window. Enter the computer name or IP address and port of the remote machine in the window. Click Confirm according to the system prompts.

Yes, you need to enable the ssh service on the mac. mac has openssh installed by default.

sudo systemsetup -getremotelogin If it has been turned on, the command will display Remote Login: On, otherwise it will display Remote Login: Off.

SSH password-free login and its principle

In the above login process, we can find that we need to enter a password every time, which is relatively troublesome. To solve this problem, SSH provides a method called public key login, which eliminates the need to enter a password.

2. Use the ssh-copy-id command to copy the public key to the remote host. ssh-copy-id will write the public key to the ~/.ssh/authorized_key file of the remote host. ssh-copy-id ldz@19160.1 After the above two steps, you will no longer need to enter a password when logging in to the remote host in the future.

3. Now log in from A as root, run scp /root/.ssh/identity.pubB:/root/.ssh/authorized_keys. The file name must be correct. 4. Now run #ssh from A and B will not need a password:) Basic principles: 1.

4. The specific operation is as shown in the figure below. Then we connect to machine B through ssh on machine A and execute the command date to check the time of machine B. We execute the command: ssh 1916159 date and you can see that you can log in to machine B without entering a password. The specific display is shown in the figure below.

5. Implementation principle Use a method called public and private key authentication for ssh login.

Use SSH to remotely log in to the server on Mac

Check whether SSH is installed. If it is not installed, enter yuminstallopensshserver to install it. Check whether the SSH service is running. If it is not enabled, use the serviceshhdstart command to enable it.

SSH remote terminal. If you only need to control the company's Linux server or computer terminal, you can use SSH to connect remotely. Enter the ssh username@server address in the Apple computer terminal application, and then enter the password to log in to the Linux server for remote control. VNC Viewer software.

You may be looking for various ssh software available on Mac online, but you may not know that Mac comes with its own remote connection tool! . Two methods are introduced below: Method 1: Connect directly using the command line. Enter the host IP, user name, password, and port number and click Quick Connect to connect.

After enabling the remote login service, use the Terminal window (Figure 6), then press the Shift-Command-K key combination, or select New Remote Connection from the Shell menu to pop up the New Remote Connection window. Select the Secure Shell service to see any enabled Macs in the server list.

Log in to your MAC system, open the browser, and download Microsoft's remote desktop tool. After downloading, click Install, as shown in the picture: Just click Continue to complete the installation. After installation, there will be this remote desktop icon under the MAC system, click to open it.

First of all, unlike Windows, Mac does not require a client like XShell for SSH connection. You can just use the terminal directly. I am using the Ubuntu 104 emulator here. In this case, it is most likely that the server prohibits root users from ssh remote login by default.

Conclusion: The above is a summary of the answers related to password-free ssh settings on mac compiled by this site for you. I hope it will be helpful to you! If your problem is solved, please share it with more friends who care about this problem~

The above is the detailed content of Password-free ssh settings for mac?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:shouxicto.com. If there is any infringement, please contact admin@php.cn delete