Friday, May 22, 2015

Turn off smbclient mget prompt

Ran into this one today - When you attempt to mget (get multiple files) using the smbclient it asks you to confirm each file. Which is a little annoying when you want to script the process. The work around is to issue the smbclient command "prompt" prior to the mget. To script it, would look like this:

# smbclient //server/share -A smb_authentication_file -c "prompt; mget *.csv"

Thursday, May 7, 2015

Takes a long time to SSH to a server

You SSH to a server and notice it takes 30 seconds or more before you're prompted for the password. If you add the -v option, you can see it hangs at service accept message. Eg:

# ssh -v myserver
debug1: SSH2_MSG_SERVICE_ACCEPT received
(hangs for 30+ seconds at this point)

The fix for me, was correcting DNS resolution on the target server.