Mac uses SSH telnet

Source: Internet
Author: User
Tags scp command


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.