3

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.

Praful Bagai
  • 16,684
  • 50
  • 136
  • 267

2 Answers2

7

You must specify port_number like this:

sshpass -p server_password ssh-copy-id user@IP -p port_number
Ghasem Pahlavan
  • 661
  • 9
  • 20
0

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

limace255
  • 41
  • 3