mssql connectivity with sqsh

the simplest mssql-compatible command line client i could find…

# install
apt-get install sqsh

# create a basic options file
gedit ~/.sqshrc
\set style=vert

# define a host
gedit ~/.freetds.conf
host =
port = 1433
tds version = 8.0

# connect
sqsh -S someserver -L user=sa -L password=password

# execute command
exec xp_cmdshell ‘whoami’

Leave a Reply

Your email address will not be published. Required fields are marked *