Uploading files to Canvas via SFTP with passphrase

Jump to solution
ToddDetwiler
Community Member

Hi all, 

We are new to Canvas and still involved in the data provisioning phase. I was told that there are multiple ways of uploading files (coming from Banner, in our case), but was under the impression that the SFTP to a Canvas server would be the simplest (no need to deal with throttling, for example). However, I have hit a snag that is really wasting a lot of time. In the case of Canvas, I've been told that I have to use an RSA key for which the private key has a passphrase. With a passphrase, even if I pass the identity file to my SFTP command, it still requires a user to interactively enter the passphrase. What I need is something that can run non-interactively, to automate file uploads.

I thought I'd found a way around this using ssh-agent and ssh-add. The agent did allow me to ssh, using the key, without the passphrase. However it turned out not to be persistent. Based on how you script agent launch, it may last only as long as the session, but certainly not past the next reboot. And then someone has to type in a passphrase again in the ssh-add call.

So, my question is, are others using SFTP without user interaction to upload to Canvas? If so, how are you handling the requirement to enter a passphrase?
Labels (1)
0 Likes
1 Solution
robotcars
Community Champion

Hi @ToddDetwiler 

I am not using SFTP. But if you're referring to SIS CSV Imports, you should be able to zip up all files and send them in a single request. There shouldn't be a concern for throttling if you are doing this daily or hourly.

Also, maybe checkout sshpass, and export the password in your bash_profile.

View solution in original post