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:
And put it on the China server:
Quote:
I can log in with:
Quote:
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:
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.


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" |
Quote:
ssh-copy-id -i ~/.ssh/newwebpage_ed25519 myusername@123.123.123.123 |
Quote:
ssh -v -i ~/.ssh/newwebpage_ed25519 myusername@123.123.123.123 |
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 |
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.