Using Postgres Backup and Restore

Alex Clay aclay at mac.com
Sun Feb 13 19:06:22 UTC 2022


Hi Das,

First, you don't need the use sudo to initiate the ssh connection (unless you're doing something really crazy). Second, you'll want to ssh as your macOS user—not root.

Say your user is named "administrator". The command to connect would be:

> ssh administrator at 192.168.1.3

Authenticate with administrator's password.

Make sure remote access is enabled in the macOS Sharing preferences for administrator and you don't have any firewalls blocking ssh. The default port is 22.

Once you connect via ssh, you can run commands with elevated privileges using sudo. If you need to become the root user, use:

> sudo -s

But that is bad, bad practice and if find yourself reaching for "login as root" as a solution, I would re-examine what you're trying to do and see if there is a better solution.

Alex

> On Feb 13, 2022, at 13:25, Das Goravani <goravanis at gmail.com> wrote:
> 
> 
> Further, how can I log into my Mac server from a remote Mac with SSH at root?
> 
> I issue the command
> 
> sudo ssh root at 192.168.1.3
> 
> Where that IP is my Mac Server, and it says connection refused
> 
> It asked for a password one time, and then thereafter says connection refused
> 
> Which password was that asking for?
> 
> 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list