title: ssh to another server and list only the directories inside a directory
body: <p>dev1.ab.com is the current server, I have to ssh to tes1.ab.com, move inside the path /spfs/tomcat/dir and list all the directories (no files) present there.</p>
  <p>For this I am using the below command from the command line of dev1.ab.co</p>
  <p>*<em>ssh tes1.ab.com &quot; ls -1d <em>/ /spfs/tomcat/dir &quot;</em></em></p>
  <p>but in output I am getting output the directories of home is /spfs/tomcat, I have also tried</p>
  <p>*<em>ssh tes1.ab.com &quot; ls -lrt /spfs/tomcat/dir | ls -1d <em>/&quot;</em></em></p>
  <p>*<em>ssh tes1.ab.com &quot; cd /spfs/tomcat/dir | ls -1d <em>/&quot;</em></em></p>
  <p>and ended up with nearly same result.</p>
  <p>can someone help me to write a command in command line of dev1.ab.com to ssh to tes1.ab.com and get the output as the list of directories present in /spfs/tomcat/dir directory.</p>