I have a CentOS host in my local network that I daily use to open SSH connections to many (over 40) other hosts in both Internet and the local network. I have set up RSA keypairs to skip the interactive authentication and some bash scripts like this:
[root@beta ~]# cat ~/connections/mywebsite.sh ssh firstname.lastname@example.org
This works fine when I need to open connections to them, but not when I need to
scp files to the same host.
Is it possible to create something equivalent to an alias to replace the username@host part like this?
[root@beta ~]# scp myfile MYWEBSITE:/var/www
The possibility to autocomplete the alias with the tab key would also be awesome.
I understand that bash aliases can only be used as the first word of the command, but is there some other way to achieve this? If not in bash, maybe another shell?