Shell - Automatically setup aliases and custom functions upon ssh into any host

Problem: I get to have to ssh into a lot of servers everyday especially to analyze the logs. And these hosts can change any time. But I would like to have my aliases and custom functions in these environments when I work.. like:

alias v='vim'; alias cl='clear'; alias l='ls -lhrt';
up() { dirs=${1:-1}; while [ ${dirs} -gt 0 ]; do; cd ..; dirs=$((dirs-1)); done;

Currently, I just have them saved in a pad and paste them into every ssh connection. Is there a way to automatically set these aliases and custom functions in every ssh session?

Approaches I've tried/eliminated:

  1. Have these aliases & functions in the .zsh/.bashrc of the target host. This is not feasible, as I may not have the permission to modify these files, and the host I need to ssh into may change at any time, and may not be previously known (large number of auto-scaled services).
  2. ssh -t 'command; bash -l' - as suggested by these posts - run-ssh-and-immediately-execute-command & can-i-ssh-somewhere-run-some-commands-and-then-leave-myself-a-prompt.

I tried this, as per these posts:

ssh -t $hostname "export H=hello; alias v=vim; up() { dirs=${1:-1}; while [ ${dirs} -gt 0 ]; do; cd ..; dirs=$((dirs-1)); done; }; zsh -l"

In the ssh session, the exported "H" retains the value, but both the set alias "v" and the function "up" are not recognized.

[prompt]/% echo $H
[prompt]/% alias v
[prompt]/% up
zsh: command not found: up

I suppose it's because H is exported as an environment variable. However, I cannot figure out how to fix this. Any help would be appreciated. Also, I don't use tmux or screen typcally. So, a plain ssh solution would be most welcome. BTW, all our hosts seem to be using zsh shell.