Article 59DQV How to automatically supply the password when connecting with ssh?

How to automatically supply the password when connecting with ssh?

by
Pedroski
from LinuxQuestions.org on (#59DQV)
Hi,

I have a little webpage for homework. I use rsync to collect the homework. rsync uses ssh.

I just set up a new webpage on a server in China, because my old GoDaddy page works fine, but it is sometimes a bit slow, being outside of the Great Firewall.

I set up an ssh password on the new server, I added the key:

Quote:
ssh-keygen -t ed25519 -f ~/.ssh/newwebpage_ed25519 -C "connect with china page"
And put it on the China server:

Quote:
ssh-copy-id -i ~/.ssh/newwebpage_ed25519 myusername@123.123.123.123
I can log in with:

Quote:
ssh -v -i ~/.ssh/newwebpage_ed25519 myusername@123.123.123.123
but I need to enter my password.

When I use rsync to connect with GoDaddy, I do not need to enter a password.

I thought this might avoid the need to enter a password.

Quote:
ssh-add ~/.ssh/newebpage_ed25519
This command generated a file called newwebpage_ed25519.pub in my home .ssh folder, but I still need to enter the password. I just tried it.

Is it possible to supply the ssh password automatically?

That way, when I run rsync from a bash script, I don't need to enter the password manually.latest?d=yIl2AUoC8zA latest?i=7rQMyvd0kn0:XyT8C7wK3bA:F7zBnMy latest?i=7rQMyvd0kn0:XyT8C7wK3bA:V_sGLiP latest?d=qj6IDK7rITs latest?i=7rQMyvd0kn0:XyT8C7wK3bA:gIN9vFw7rQMyvd0kn0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments