def setup_ssh():
    user = cget("user")
    ssh_target_dir = cget("ssh_target")

    # Ensure SSH directory is created with proper perms.
    create_target_directories([ssh_target_dir], "700", user)

    # Upload SSH config and keys.
    # TODO: Add copying files from remote folder (upload_ssh_keys_from_local).
    if cget('upload_ssh_keys_from_local') or True:
        files = cget('ssh_files')
        if not files:
            show(yellow("No SSH files to upload."))
            return
        show(yellow("Uploading SSH configuration and keys"))
        for name in files:
            show(u"File: {0}".format(name))
            local_path = pjoin(local_files_dir("ssh"), name)
            remote_path = pjoin(ssh_target_dir, name)
            put_file_with_perms(local_path, remote_path, "600", user, user)
    else:
        # Remoty copying of files
        raise Exception('Not implemented!'
            ' Please set upload_ssh_keys_from_local to True!')
Uploads ssh from the local folder specified in config.
dataset/ETHPy150Open ipeirotis/Mturk-Tracker/deployment/fabfile.py/setup_ssh