Connect to server via SSH using MacOS

hoseke

Member
Jan 4, 2012
17
2
53
cPanel Access Level
Root Administrator
Hi,
Trying to connect server via SSH using MacOS, and i found this url in documentation:

SSH Access - Version 76 Documentation - cPanel Documentation

To log in to your MacOS or Linux server via SSH, perform the following steps:

  1. Open a terminal session.
  2. Run the following command:

    ssh -p port [email protected]
    Note:

    In the above command:
    • port represents the port number.
    • user represents your username.
    • IP represents your IP address.
And i'm confused:

1.Which port? How do i know my port?
2. user name, i think this refer to: root ?
3. IP address, is this server IP? or my network/router IP?

Any one using MacOS, appreciate it.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello @hoseke,

If you're attempting to access your cPanel & WHM server via SSH as "root", then your username is "root" and the IP address is the IP address of the cPanel & WHM server. By default, the SSH port is 22.

Thank you.
 
  • Like
Reactions: hoseke

hoseke

Member
Jan 4, 2012
17
2
53
cPanel Access Level
Root Administrator
Hello @cPanelMichael, I'll try using the info provided, port 22 same as SFTP.

when i restart ssh via WHM received the following:

"sshd (/usr/sbin/sshd -D) is running as root with PID xxxxxxx (systemd+/proc check method)."

another question: PID is a 7 digits number, but is doesn't mean its the Port number?

Thank you.
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,980
156
368
SLC
cPanel Access Level
DataCenter Provider
Look for this
Startup Log
Dec 18 09:05:02 hostname systemd[1]: Starting OpenSSH server daemon...
Dec 18 09:05:02 hostname sshd[3133744]: Server listening on 0.0.0.0 port 22.


or you can just open a terminal on WHM an run
grep Port /etc/ssh/sshd_config
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
"sshd (/usr/sbin/sshd -D) is running as root with PID xxxxxxx (systemd+/proc check method)."
This is normal output. It shows that SSH is running well.

another question: PID is a 7 digits number, but is doesn't mean its the Port number?
PID means "Process ID". It's the ID associated with the SSHd process that's running.

Thank you.