Open Source

[ OSS - WinSCP ] Linux SFTP 접속

Pydole 2019. 8. 6. 13:20

리눅스에서 hostkey 얻는 방법. (SFTP로 접속할 계정으로 SSH 로그인)

 

$ ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key

 

2048 .......

 

 

 

WinSCP 스크립트 파일 : scriptfile.txt

 

 open sftp://user:password@host -hostkey="ssh-rsa 2048 ......."
 close
 exit

 

 

 

배치파일 (bat) 작성 

 

 @echo off
 winscp.com /ini=nul /script=scriptfile.txt