There's a reason I have $USER and $USERNAME, but I see your point and I'll look at combining them. But that doesn't explain why the script is failing... It's reading my .ssh/config, pulling the correct key/user combo and sends them to the remote server. The remote server accepts the key, but then the script dies with the error...