Praful Bagai
Praful Bagai

Reputation: 17382

How to sshpass ssh-copy-id?

I dont want to keep typing the passwords again and again, hence want to provide it into the command itself. How can I do it?

Currently, I'm doing like this

sshpass -p server_password port_number ssh-copy-id user@IP

It says,

sshpass: Failed to run command: No such file or directory

Where am I going wrong? I found the net, and it was given the same.

Upvotes: 3

Views: 13377

Answers (2)

limace255
limace255

Reputation: 41

You must specify the path of the remote host : sshpass -p server_password port_number ssh-copy-id user@IP:your_path_here

Upvotes: 0

Ghasem Pahlavan
Ghasem Pahlavan

Reputation: 721

You must specify port_number like this:

sshpass -p server_password ssh-copy-id user@IP -p port_number

Upvotes: 7

Related Questions