MamoruDS / ws-212S

ssh config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ws-212S

// hosts.js
const sshconf = require('./dist/main')

sshconf.config.defaultUser = 'uname'
sshconf.config.allowPassword = false

const hosts = new sshconf.Hosts()

hosts.add('VPS', {
    host: 'server.your.hostname',
    user: 'remote',
    acceptKeys: ['id_rsa'],
    allowPassword: false,
    strictHostKeyChecking: false,
    comment: 'vps @server.your.hostname',
})

hosts.add('PI', {
    host: '10.0.1.1',
    allowPassword: false,
    strictHostKeyChecking: false,
    comment: 'raspberry pi',
})

console.log(JSON.stringify(hosts.dump()))
node hosts.js > hosts.json

About

ssh config


Languages

Language:TypeScript 97.0%Language:JavaScript 3.0%