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
[someserver]
host = 10.1.1.1
port = 1433
tds version = 8.0

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

# execute command
exec xp_cmdshell ‘whoami’
go

Leave a Reply

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