A TACACS+ client built on .NET Standard using C#. Based on this IETF Internet-Draft.
// TACACS+ server configuration info
string serverIP = "192.168.18.19";
int serverPort = 49;
string sharedKey = "test";
// User info
string username = "tacacsSharp";
string password = "changeme@123";
string remoteAddress = "192.168.18.3"; // user IP address
string port = "vty0"; // user port
// Create the client
var client = new TacacsSharpClient(serverIP, serverPort, sharedKey);
// Authenticates an user using ASCII method
if(client.AuthenticateAscii(username, password, remoteAddress, port) == AuthenticationStatus.PASS)
{
Console.WriteLine("May the force be with you...");
}
else
{
Console.WriteLinte("YOU SHALL NOT PASS!");
}
- Version 1.0
- Synchronous and Asynchronous authentication