How do i bypass input fied in command promt? [duplicate]
Solution 1:
Assume your case for scp from 192.168.1.1 try below command.
scp -i ~/.ssh/mytest.key [email protected]:/<filepath on host> <path on client>
make sure the key file should have permission 600 or 400.
Solution 2:
You can follow below procedure as well:
- Generate ssh key using below command
~]$ ssh-keygen
It will ask you for details like file name, file location, passphrase etc.
- Make sure keep location and file name as default which will be
/home/user/.ssh/rsa_id
After confirming passphrase, private and public key files will be created.
- Create file with name authorized_keys in same .ssh folder as in step 2. Copy contents of public key in this file.
You are done! Works for both ssh and scp the only password required will your passphrase (if you keep one).