IBM Sterling B2B: Criando um SFTP Server Adapter: Difference between revisions
No edit summary |
|||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Abaixo descrevo como configurar um SFTP Server Adapter | Abaixo descrevo como configurar um SFTP Server Adapter | ||
[[File:sftp-server-adapter.png]] | |||
Dica: | Dica: | ||
Line 5: | Line 7: | ||
Ao criar um recurso no B2Bi tente definir uma nomenclatura que te auxilie a encontrar e exportar os dados. Como: | Ao criar um recurso no B2Bi tente definir uma nomenclatura que te auxilie a encontrar e exportar os dados. Como: | ||
<Empresa>_<Projeto/Serviço>_<Tipo do Server Adapter> | <Empresa>_<Projeto/Serviço>_<Tipo do Server Adapter>_serveradapter_<PORTA> | ||
Neste exemplo utilizo o seguinte | Neste exemplo utilizo o seguinte | ||
customer_projectx_sftp_serveradapter_5022 | |||
Line 27: | Line 29: | ||
* Key Comment: '''hostkey for production environment''' | * Key Comment: '''hostkey for production environment''' | ||
* Enabled: selecionar | * Enabled: selecionar | ||
Figura ilustrativa: | |||
[[File:b2b_create_hostkey_01.png]] | [[File:b2b_create_hostkey_01.png]] | ||
4) Confirme os dados e clique em '''Finish''' | 4) Confirme os dados e clique em '''Finish''' | ||
Figura ilustrativa: | |||
[[File:b2b_create_hostkey_02.png]] | [[File:b2b_create_hostkey_02.png]] | ||
Line 40: | Line 46: | ||
2) Em ''Select Service type'', informe abaixo e clique em '''Next''' | 2) Em ''Select Service type'', informe abaixo e clique em '''Next''' | ||
* Service Type: '''SFTP Server Adapter''' | * Service Type: '''SFTP Server Adapter 2.0''' | ||
3) Em ''SFTP Server Adapter: Name'', informe abaixo e clique em '''Next''' | 3) Em ''SFTP Server Adapter: Name'', informe abaixo e clique em '''Next''' | ||
Line 47: | Line 53: | ||
* Description: '''SFTP Server for ProjectX''' | * Description: '''SFTP Server for ProjectX''' | ||
* Environment: '''node1''' | * Environment: '''node1''' | ||
* Select a group: ''' | * Select a group: '''Create a Group''' e '''customer_sftp_sa_group''' | ||
4) Em ''customer_projectx_sftp_serveradapter_5022: Configuration'', informe abaixo e clique em '''Next''' | 4) Em ''customer_projectx_sftp_serveradapter_5022: Configuration'', informe abaixo e clique em '''Next''' | ||
Line 55: | Line 61: | ||
* Host Identity Key: '''<INFORMAR_A_HOST_IDENTITY_KEY_CRIADO_ANTERIORMENTE>''' | * Host Identity Key: '''<INFORMAR_A_HOST_IDENTITY_KEY_CRIADO_ANTERIORMENTE>''' | ||
* SFTP Server Listen Port: '''5022''' | * SFTP Server Listen Port: '''5022''' | ||
* Payload Repository | * Payload Repository: '''Mailbox''' | ||
5) Em ''customer_projectx_sftp_serveradapter_5022: Configuration: Document Storage'', informe abaixo e clique em '''Next''' | 5) Em ''customer_projectx_sftp_serveradapter_5022: Configuration: Document Storage'', informe abaixo e clique em '''Next''' | ||
Line 72: | Line 78: | ||
9) Confirme os dados e clique em '''Finish''' | 9) Confirme os dados e clique em '''Finish''' | ||
Figura Ilustrativa: | |||
[[File:sftp_adapter_config2.png]] | [[File:sftp_adapter_config2.png]] | ||
== Testando o SFTP Server Adapter== | |||
1) Abrir um terminal | |||
2) Criar um arquivo de exemplo | |||
touch example.txt | |||
3) Conectando ao nosso adapter e submetendo um arquivo | |||
'''sftp -P 5022 <nowiki><user_at_sterling>@<sfg_b2b_hostname></nowiki>''' | |||
Aceite a nova chave: | |||
sftp -P 5022 <nowiki>[email protected]</nowiki> | |||
The authenticity of host '[10.0.0.1]:5022 ([10.0.0.1]:5022)' can't be established. | |||
RSA key fingerprint is SHA256:1u/hMWA4C/YF9o2CUUUhdAc1rzPL9/IxZYUnGhnon3c. | |||
RSA key fingerprint is MD5:4a:dd:62:72:db:65:ac:17:26:0f:34:1e:56:a0:e8:46. | |||
Are you sure you want to continue connecting (yes/no)? '''yes''' | |||
Informe a senha: | |||
Warning: Permanently added '[10.0.0.1]:5022' (RSA) to the list of known hosts. | |||
SSH Server supporting SFTP only | |||
[email protected]'s password: | |||
Connected to 10.0.0.1. | |||
Listando o diretório remoto: | |||
sftp> pwd | |||
Remote working directory: / | |||
sftp> ls | |||
sub1 sub2 sub3 | |||
Listando o diretório local: | |||
sftp> | |||
sftp> lcd /tmp | |||
sftp> lls | |||
example.txt | |||
Enviando o arquivo: | |||
sftp> put example.txt | |||
Uploading example.txt to /example.txt | |||
example.txt 100% 0 0.0KB/s 00:00 | |||
Encerrando a conexão: | |||
sftp> quit | |||
Verificando na mailbox | |||
[[File:mailfile_uploaded_file.png]] | |||
= Ver também = | = Ver também = | ||
* [[Sterling B2B: Criando | * [[Sterling B2B: Criando um SFTP Server Adapter]] | ||
* [[IBM Sterling B2B: Usando um SFTP Server Adapter]] | * [[IBM Sterling B2B: Usando um SFTP Server Adapter]] | ||
Latest revision as of 19:53, 15 October 2020
Abaixo descrevo como configurar um SFTP Server Adapter
Dica:
Ao criar um recurso no B2Bi tente definir uma nomenclatura que te auxilie a encontrar e exportar os dados. Como: <Empresa>_<Projeto/Serviço>_<Tipo do Server Adapter>_serveradapter_<PORTA> Neste exemplo utilizo o seguinte customer_projectx_sftp_serveradapter_5022
Procedimento
Configurar o SSH Host Key
1) No Dashboard do B2Bi, clique no menu Deployment > SSH Host Identity Key
2) Em Create, clique no botão Go!
3) Informe os dados e clique em Next
- Host Name: customer_sfgb2b_production_hostkey
- Key Type: ssh-rsa
- Key Length: 2048
- Key Comment: hostkey for production environment
- Enabled: selecionar
Figura ilustrativa:
4) Confirme os dados e clique em Finish
Figura ilustrativa:
Configurar o Service Adapter
1) No Dashboard do B2Bi, clique no menu Deployment > Services > Configuration
2) Em Select Service type, informe abaixo e clique em Next
- Service Type: SFTP Server Adapter 2.0
3) Em SFTP Server Adapter: Name, informe abaixo e clique em Next
- Name: customer_projectx_sftp_serveradapter_5022
- Description: SFTP Server for ProjectX
- Environment: node1
- Select a group: Create a Group e customer_sftp_sa_group
4) Em customer_projectx_sftp_serveradapter_5022: Configuration, informe abaixo e clique em Next
- Perimeter Server: node1 & local
- Enabled Protocols: SFTP and SCP
- Host Identity Key: <INFORMAR_A_HOST_IDENTITY_KEY_CRIADO_ANTERIORMENTE>
- SFTP Server Listen Port: 5022
- Payload Repository: Mailbox
5) Em customer_projectx_sftp_serveradapter_5022: Configuration: Document Storage, informe abaixo e clique em Next
- Document Storage: File System
- Support for concurrent duplicate-named file transfers: Limited
6) Em customer_projectx_sftp_serveradapter_5022: Add Policies, clique em Next
7) Em projectx_sftp_server: Configuration, informe abaixo e clique em Next
- Should the adapter be restricted to a certain group of users?: No
- Should users start in the directory that matches their user name upon logon?: Yes
8) Em customer_projectx_sftp_serveradapter_5022: Extractability, clique em Next
9) Confirme os dados e clique em Finish
Figura Ilustrativa:
Testando o SFTP Server Adapter
1) Abrir um terminal
2) Criar um arquivo de exemplo
touch example.txt
3) Conectando ao nosso adapter e submetendo um arquivo
sftp -P 5022 <user_at_sterling>@<sfg_b2b_hostname>
Aceite a nova chave:
sftp -P 5022 [email protected] The authenticity of host '[10.0.0.1]:5022 ([10.0.0.1]:5022)' can't be established. RSA key fingerprint is SHA256:1u/hMWA4C/YF9o2CUUUhdAc1rzPL9/IxZYUnGhnon3c. RSA key fingerprint is MD5:4a:dd:62:72:db:65:ac:17:26:0f:34:1e:56:a0:e8:46. Are you sure you want to continue connecting (yes/no)? yes
Informe a senha:
Warning: Permanently added '[10.0.0.1]:5022' (RSA) to the list of known hosts. SSH Server supporting SFTP only [email protected]'s password: Connected to 10.0.0.1.
Listando o diretório remoto:
sftp> pwd Remote working directory: / sftp> ls sub1 sub2 sub3
Listando o diretório local:
sftp> sftp> lcd /tmp sftp> lls example.txt
Enviando o arquivo:
sftp> put example.txt Uploading example.txt to /example.txt example.txt 100% 0 0.0KB/s 00:00
Encerrando a conexão:
sftp> quit
Verificando na mailbox