I have many remote machines I need to log in. I need somehow store connection parameters because it is too boring enter them manually. Also I prefer to store password in these shortcuts. Software similar MTPuTTY that runs under windows would would solve my problem in Ubuntu.
How to solve this problem?
You can do a lot using
.ssh/config
file. It would allow you to replace this:with:
to do so you have to add the following lines at the end of the
.ssh/config
(create it if does not exist)Concerning the storage of your credentials, I strongly advise you to use key authentification instead of password based. You can create them either with a GUI or with your terminal.
GUI
open
Seahorse
, selectFile > New
, thenSecure Shell Key
and let the interface guide youTerminal Create you RSA key pair:
Store the Keys and Passphrase:
Copy the Public Key
Sources:
If you wanted to, you could make short shell scripts to launch your ssh sessions, then execute them either as s executable (
chmod o+x
), or using the dot.
commandLike make a file
~/ssh2hostA.sh
then start it with
. ~/ssh2hostA.sh
Which is not a good thing to do because not only do you have passwords in cleartext scattered in your files, but people will probably be able to see the password in the
w
command. ( andtop
, and/proc
)Really, you should be using ssh host keys for this.
Really.