Hi Francis
The startup config is at /flash/config/default.cfg but you cannot get to it using scp from outside, neither the MAS or controller allows inbound SCP, only outbound (same for ftp, tftp etc.)
The other problem with using something like sshpass is that if you want to SCP out of the controller you need to be able to interactively enter the scp password.
to get the startup config out, use
copy flash: default.cfg tftp: 1.2.3.4 default.cfg
or
copy flash: default.cfg scp: 1.2.3.4 username /path/to/somewhere/default.cfg
It's better to backup the whole flash, as it will allow the controller to be rebuilt much faster if there is a need for it, i.e.
backup flash
copy flash: flashbackup.tar.gz scp: 1.2.3.4 root /somewhere/flashbackup.tar.gz
or
copy flash: flashbackup.tar.gz tftp: 1.2.3.4 flashbackup.tar.gz
As for how to automate this, you can use expect or some other scripting language to automate this. There is likely freeware available for Cisco switches that will do the job. Another option is to automate via the webUI (there are freeware webUI automation tools around the place), where you can automate
1> nav to login -> maintenance -> file -> backup flash -> create backup (click) -> wait 1 minute
2> nav to file -> copy files -> flash filesystem (select flashbackup.tar.gz) -> tftp server (input ip/filename) -> Apply
regards
-jeff