&gt; f=$(mktemp) &amp;&amp; ssh-keyscan korell &gt; $f &amp;&amp; ssh-keygen -l -f $f &amp;&amp; rm $f<p>&gt; Unfortunately ssh-keygen does not support input from stdin, so this example is slightly more complicated than it should.<p>Any shell that supports process substitution can fix this for you with something like;<p>ssh-keygen -l -f &lt;(ssh-keyscan korell)