TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


technote:sftp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
technote:sftp [2019/04/19 22:27] Gerard Nicoltechnote:sftp [2025/01/21 22:07] (current) – external edit 127.0.0.1
Line 2: Line 2:
  
 ===== Linux ===== ===== Linux =====
 +
 +==== Using TMSS10SFTP ====
 +
 +The ''TMSS10SFTP'' program is installed by default with the TapeTrack Command Line Programs for Linux.
 +
 +This program provides more automation that the native ''sftp'' command and is able to automatically select the newest file in a directory.
 +
 +This comes in handy when downloading files from Iron Mountain as they only provide time-stamped files requiring the user to know the name of the file to be downloaded in advance.
 +
 +Documentation for ''TMSS10SFTP'' can be found [[cli:tmss10sftp|here]].
 +==== Using sshpass and sftp ====
  
 The Linux ''sftp'' command does not provide an argument to specify a password. If you do not want to configure keys for the transfer, you can install the ''sshpass'' program. The Linux ''sftp'' command does not provide an argument to specify a password. If you do not want to configure keys for the transfer, you can install the ''sshpass'' program.
  
-<sxh bash;>+<code text;>
 [root@corp-01 ~]# yum install sshpass [root@corp-01 ~]# yum install sshpass
 Last metadata expiration check: 0:04:14 ago on Fri 19 Apr 2019 04:22:49 PM MDT. Last metadata expiration check: 0:04:14 ago on Fri 19 Apr 2019 04:22:49 PM MDT.
Line 40: Line 51:
  
 Complete! Complete!
-</sxh>+</code> 
 + 
 +Once ''sshpass'' is installed, you can call ''sshpass'', pass the password and then pass the ''sftp'' command string as an argument. 
 + 
 +<note tip>To specify multiple command strings you can either pass a file fill of commands, or you can use the bash here-string syntax.</note> 
 + 
 + 
 +<code text;> 
 +[root@corp-01 ~]# sshpass -p "password" sftp user@server.tapetrack.com <<< "put drm.csv upload/drm.csv" 
 +Connected to server.tapetrack.com. 
 +sftp> put drm.csv upload/drm.csv 
 +</code> 
 + 
 +===== Windows =====
  
 +Windows users wanting to send files via SFTP can use the ''TMSS10SFTP'' command (installed as part of the TapeTrack Server Utilities package), or a third-party program such as [[https://winscp.net | WinSCP]].
  
-<sxh bash;> 
-sshpass -p "password" sftp -v user@server.tapetrack.com <<< $'cd upload\n put drm.csv\n ls -al' 
-</sxh> 
  
 +{{tag>technote files}}
technote/sftp.1555712861.txt.gz · Last modified: 2025/01/21 22:07 (external edit)