#35 Making sftp Look More Like ftp

The secure version of the file transfer protocol ftp program is included as part of ssh, the secure shell package, but its interface can be a bit confusing for users who are making the switch from the crusty old ftp client. The basic problem is that ftp is invoked as ftp remotehost, and it then prompts for account and password information. By contrast, sftp wants to know the account and remote host on the command line and won't work properly (or as expected) if only the host is specified.

To address this, a simple wrapper script allows users to invoke mysftp exactly as they would have invoked the ftp program, using prompts for needed fields.

The Code

 #!/bin/sh # mysftp - Makes sftp start up more like ftp. ...

Get Wicked Cool Shell Scripts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.