First, open SSH
Mac Terminal is a self-signed SSH, you can use Whereis to see:
$ whereis SSH
However, there is no process in the existing process to find the SSH counterpart:
grep sshapple 25927 0. 0 0. 616 S003:0:xx. grep ssh
The following error prompts are encountered when connecting to a local host or remote host directly with the SSH command:
Connect to host localhost Port 22:connection refused
Google a bit because the system Setup does not open remote logins, see: How does I open port in OSX 10.6.7
Workaround:
Open System Preferences--share, check remote login:
Enter SSH localhost to test, if you are prompted to enter a password to authenticate it is no problem.
At this point, grep the process to see that the SSH process is running:
grep sshapple 4656 0. 0 0. 1540?? S three 0:xx. 0.0. 612 S003:0:xx. grep ssh
Ii. SSH and SCP
You can then connect to other hosts via SSH commands, such as:
SSH [email protected]
Where username is the user name of the host to be logged on, 192.168.100.100 is the IP address of the host to log on to.
To see how many users are currently logged in, you can use the WHO command to view them.
The SCP command can transfer files between the local host and the remote host, using the following simple:
$ SCP. ZSHRC username@192. 168.100.:/users/username/
This command copies the. zshrc file under the current path to the/users/username directory of the remote host.
This saves you from having to reset it again. ZSHRC trouble.
Reference: How to use CP and SCP commands in Linux
If the input [email protected] is wrong, then the shell will not have any hint, only enter the correct address, will require us to enter the command authentication, so that the next action.
Mac uses SSH telnet