As far as we know, there is no weakness in SHA-256 (which outputs $256$ bits, i.e. 32 bytes). This means, the best attack is a brute-force attack, i.e. about $2^{255}$ tries to find a preimage to a given hash, and about $2^{128}$ tries to find two different messages with matching hashes (i.e. a collision).
An SSH fingerprint consists of 16 bytes (written as 32 hex digits with :
separators) , i.e. $128$ bits. However good the underlying hash function might be, still in about $2^{64}$ tries we can find a collision.
Having a slower hash function here might cost proportionally more work (e.g. by a factor $2^{15}$ if the user is still to accept this), which means finding a collision would be at the limit of what is doable nowadays.
The good thing is that a fingerprint collision is not what you have to worry about as an SSH user – if an attacker succeeds to put up two servers with identical fingerprints, nobody will care.
The more interesting attack would be a second preimage attack (i.e. given the fingerprint (and the public key) of a server to be impersonated, find a second public key which maps to the same fingerprint.
Actually, even this would not be that dangerous – as long as the used signature scheme is secure, the attacker wouldn't find the corresponding private key.
So what is needed for a successful impersonation attack is to find a private key so that the matching public key would have the same (or at least a superficially similar) fingerprint as the real server (or "any real server", if we have multiple targets we can attack). Not knowing what hash is used by SSH for its key fingerprints, I still suppose that the fastest way to do this would be to randomly generate key pairs until we hit a fitting one, which would need around $2^{127}$ tries.
I suppose around any cryptographic hash would do, including simply truncating the output of SHA-256 to 128 bits.
For your software hash, about the same things are needed. A collision attack is only a problem if the creator of the software would create two versions, one of them "good" and the other one "bad", lets someone else check and approve the good one, and then (maybe selectively) offers the bad one for download.
If all you fear is a forgery of your software (or even transfer errors) then you only have to fear a second preimage attack, and 128 bits of a good hash (not MD5) should be enough.
If you want to calculate this in JavaScript (which usually means "in a browser"), please make sure that your JavaScript checker itself, as well as the "right" hash might be forged. So only do this when you deliver the page and the script by SSL/TLS, and there can't be any malicious script in the same context.