2021-05-28 21:45:59 -07:00
|
|
|
import {
|
|
|
|
ICredentialType,
|
2021-06-12 09:39:55 -07:00
|
|
|
INodeProperties,
|
2021-05-28 21:45:59 -07:00
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class SshPrivateKey implements ICredentialType {
|
|
|
|
name = 'sshPrivateKey';
|
2021-09-11 01:15:36 -07:00
|
|
|
displayName = 'SSH Private Key';
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2021-05-28 21:45:59 -07:00
|
|
|
{
|
|
|
|
displayName: 'Host',
|
|
|
|
name: 'host',
|
|
|
|
required: true,
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2021-05-28 21:45:59 -07:00
|
|
|
default: '',
|
|
|
|
placeholder: 'localhost',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Port',
|
|
|
|
name: 'port',
|
|
|
|
required: true,
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'number',
|
2021-05-28 21:45:59 -07:00
|
|
|
default: 22,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Username',
|
|
|
|
name: 'username',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2021-05-28 21:45:59 -07:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Private Key',
|
|
|
|
name: 'privateKey',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2021-05-28 21:45:59 -07:00
|
|
|
typeOptions: {
|
|
|
|
rows: 4,
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Passphrase',
|
|
|
|
name: 'passphrase',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2021-05-28 21:45:59 -07:00
|
|
|
default: '',
|
|
|
|
description: 'Passphase used to create the key, if no passphase was used leave empty',
|
|
|
|
},
|
|
|
|
|
|
|
|
];
|
|
|
|
}
|