how to scp in mc (and remember)?
To simplify your setup, you can set up an SSH config file which is located at ~/.ssh/config
. Add an entry to the file like:
Host server
User l33t
HostName server.example.org
The HostName directive is optional if it matches the name given in Host. This is basically an alias to typing [email protected]
. You could make the name as short a s
in the Host line if you want to avoid a lot of typing. You can also ignore the User line when the remote username is the same as your local username. With the above config, all you need to type is ssh server
, scp file-to-copy server:
, and so on.
OpenSSH does not support storing passwords since this is normally a bad idea, but it offers a more secure alternative called public key authentication. With public keys, you can log onto multiple servers automatically even if each server has a different password. Public keys use a private key that is normally stored on disk with a password. This password is use to load the private key which is then used to authenticate to the remote server. To avoid typing in the password for the private key all the time, the private key can be loaded into an SSH Public Key Agent such as ssh-agent
or GNOME Keyring. While the agent is running with the loaded private key, you can authenticate to any server automatically with no password needed. You can also store a private key to disk without a password, but this is less secure and equivalent to storing a plain-text password to disk. Take a look at setting up ssh public key.