SuggestionSuggestion from symcbean comment solvedsolved the problem, but there is one interesting possibility.
Why open Emacs in ssh if you can open ssh in Emacs? ;) If you have TrampMode which is part of standard Emacs installation you can press Ctrl+x f and enter /ssh:hostname:filename (you can use Tab completion) and press Enter. After that you will be prompted for password to remote host and file will be opened.
This should work for your problem as Emacs is opened on local machine. Next advantage is that there is no need to have configs for Emacs (end even Emacs) on remote machine.