i know how can ssh to server as
$ ssh <user>@<domain>
then second the command prompt ask for password as
<user>@<domain>'s password : -----
here how can be able to do same with one line ?, that looks like
$ssh <user>@<domain-name> -p <pass>
is it possible ? if yes how ?
There are several ways to help you doing this. But you may have a security concern in mind while using those tools.
- ssh-key without passphrase (lack of security here)
You can create a ssh-key and add it to the trusted keys on your distant server.
- ssh-key with ssh-agent
You can create a ssh-key with a passphrase (more secure) and use ssh-agent to help with automation.
- ssh config file
This file may help to pair keys with servers
Source : Link , Question Author : Greesh Kumar , Answer Author : Django Janny