1

Im writing a shell script to use the scp command (ssh) to transfer a file across to a computer. This obviously is password protected is there a way on either end to either...disable the password or to auto complete the password for the customer?

This out of pure convience and I have no idea if it is possible (im fairly new to linux), any help or pointers would be appreciated.

Thanks in advance

Candyfloss
  • 3,848
  • 4
  • 31
  • 32

3 Answers3

6

You can generate a pair of RSA/DSA keys (public and private). In your terminal:

$ ssh-keygen

It will generate a pair of files:

  • Private key: .ssh/id_dsa
  • Public key: .ssh/id_dsa.pub

Then, if you have access to remote host, you can add your public key to .ssh/authorized_keys file. In your remote host, copy the public key and use the following command:

cat id_dsa.pub >> .ssh/authorized_keys
beagleknight
  • 668
  • 1
  • 6
  • 15
2

You should you public key identification if you have access to SSH keys on both machines.

sha
  • 17,824
  • 5
  • 63
  • 98
1

have a look at ssh keys. github has a nice intro

second
  • 28,029
  • 7
  • 75
  • 76