2023-01-27 03:22:44 -08:00
|
|
|
import type { 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,
|
2023-05-23 02:01:24 -07:00
|
|
|
password: true,
|
2021-05-28 21:45:59 -07:00
|
|
|
},
|
|
|
|
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',
|
2023-05-04 08:11:29 -07:00
|
|
|
typeOptions: { password: true },
|
2021-05-28 21:45:59 -07:00
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|