A cs problem killer, demonstrate the solutions to the various problems we often encounter when using computers to perform various tasks.
3
stars
0
forks
source link
How connect to SSH server without password and shorten the command? #9
Open
kevinleeex opened 6 years ago
--> Describe the problem
I don't want to enter a password and such a long command every time I login to the SSH server. What should I do?
--> Demonstrate the solution
What you should do is add a
config
file to save the SSH information. The steps are detailed demonstrated below:Create a new file named
config
in your local.ssh
folderEdit the
config
file with the following templateTemplate
Copy your public key to the remote server's
~/.ssh/authorized_keys
Using
--> Additional context
Now you can connect to your ssh server without password, and also it's available when using the
scp
command.