refactored scripts to prepare ssh access to metadata