rhel7 – How to redirect an ssh welcome message on Linux to my local machine

I want to redirect the ssh welcome message to a file on my local machine. After that, I have to execute some commands on a remote machine using ssh. When I try ssh @ | dd of = NOMFICHIERThis command writes the output to the log file, but the terminal hangs so that the rest of the command execution does not occur.

Please, help me redirect the ssh welcome message