mcp-ssh
Version:
SSH Server for Model Context Protocol
28 lines (27 loc) • 805 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadConfig = loadConfig;
const fs_1 = __importDefault(require("fs"));
function loadConfig() {
const configPath = process.env.SSH_CONFIG_PATH || 'config.json';
try {
const configData = fs_1.default.readFileSync(configPath, 'utf8');
return JSON.parse(configData);
}
catch (error) {
return {
server: {
host: '0.0.0.0',
port: 8080
},
connections: {},
logging: {
level: 'info',
file: 'ssh-server.log'
}
};
}
}