Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a Solaris server and I need to remove a file at remote machine using sftp (I can't use ssh). Is it possible to pass a private key for auth to this command (I don't see -i parameter in Solaris) and how to remove this file? Thanks.

share|improve this question
    
SFTP runs over SSH. Why can't you use SSH? –  orien Oct 18 '11 at 8:48

1 Answer 1

up vote 0 down vote accepted

You can use the -o option to pass SSH options. Eg

sftp -oIdentityFile=/path/to/identity user@host

This will connect and start the interactive SFTP session. Enter the commands following the sftp> prompt:

sftp> rm /path/to/file
Removing /path/to/file
sftp> bye

And you're done!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.