Viktor Mukhachev
Viktor Mukhachev

Reputation: 503

how to not enter password million of times on unix?

What I need is to copy a file from one system to another, only root has rights to put the file to the destination location and only root can read from the source location. So I do:

  1. start PuTTY session on a source machine, enter password
  2. sudo bash, again enter password
  3. scp /etc/ username@destination:/home/username/file.tmp, enter password again!

  4. start PuTTY session on a destination machine, enter password

  5. sudo cp file /home/username/file.tmp /etc/, enter password again

Is there a shortcut? Is there a way to insert the password from the clipboard? or just use the same password on every request?

Upvotes: 1

Views: 128

Answers (1)

DROOM
DROOM

Reputation: 165

You can ask the server administrator if key-based authentication is available - this way you store an ssh-key on your machine and this takes care of authentication which means you don't have to enter your password again and again.

Upvotes: 2

Related Questions