Run a batch file using SqlAgent or SSMS

I have my linked server successfully created. The linked server was created using putty session and port forwarding within the session as it uses SSH.
But for the linked server to work the Putty Session has to be open. I do not know if there is a way to have the session always open just like other linked servers.

If i query the linked server: All i get is

OLE DB provider "MSDASQL" for linked server returned message "[MySQL][ODBC 5.3(a) Driver]Can't connect to MySQL server on 'localhost' (10061)".
Msg 7303, Level 16, State 1, Line 6
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server.

If i have the putty session open then it works well.