title: How to run Shell script having ssh commands using cron job in kubernetes
body: <p>I want to run shell script which are having ssh commands in the file using cron job in the kubernetes</p>
  
  <p><strong>test.sh</strong></p>
  
  <pre><code>#!/bin/bash
  
  echo copying files from edge node to batch pods;
  ssh -q userid@&lt;hostname&gt;"kubectl config use-context testnamespace";
  ssh -q userid@&lt;hostname&gt;"kubectl scale statefulsets testpod --replicas=1";
  </code></pre>
  
  <p>when I executing it manually by going pod, it is throwing me error <code>"ssh command not found"</code> and by triggering job throwing me <code>permission denied</code> message.</p>
  
  <p>can anyone help me how to resolve this issue.</p>