2022-07-24 08:36:17 -07:00
|
|
|
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2021-05-28 21:45:59 -07:00
|
|
|
|
|
|
|
export class SshPrivateKey implements ICredentialType {
|
|
|
|
name = 'sshPrivateKey';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-09-11 01:15:36 -07:00
|
|
|
displayName = 'SSH Private Key';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2022-12-22 08:01:29 -08:00
|
|
|
documentationUrl = 'ssh';
|
|
|
|
|
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',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|