Как говорится в этой выдержке из man ssh
,
When the user's identity has been accepted by the server, the server
either executes the given command in a non-interactive session or, if no
command has been specified, logs into the machine and gives the user a
normal shell as an interactive session.
.profile
читается только в интерактивных оболочках входа. Так что все в порядке. Взгляните на этот ответ. Это объясняет, что такое интерактивная оболочка.