SSHFS for OSX 10.8 (Mountain Lion) [closed]

OSXFUSE seems to work. I just downloaded the two OSXFUSE and SSHFS packages from http://osxfuse.github.com (the links are on the right hand side), and ran: sshfs user@host:/dir /mnt/somelocaldirectory EDIT: if you want a GUI, you might want to try sshfs-gui, though I haven’t tried it myself. Personally, I’d use Cyberduck, though it doesn’t technically do … Read more

Paramiko’s SSHClient with SFTP

paramiko.SFTPClient Sample Usage: import paramiko paramiko.util.log_to_file(“paramiko.log”) # Open a transport host,port = “example.com”,22 transport = paramiko.Transport((host,port)) # Auth username,password = “bar”,”foo” transport.connect(None,username,password) # Go! sftp = paramiko.SFTPClient.from_transport(transport) # Download filepath = “/etc/passwd” localpath = “/home/remotepasswd” sftp.get(filepath,localpath) # Upload filepath = “/home/foo.jpg” localpath = “/home/pony.jpg” sftp.put(localpath,filepath) # Close if sftp: sftp.close() if transport: transport.close()

How to SFTP with PHP?

PHP has ssh2 stream wrappers (disabled by default), so you can use sftp connections with any function that supports stream wrappers by using ssh2.sftp:// for protocol, e.g. file_get_contents(‘ssh2.sftp://user:pass@example.com:22/path/to/filename’); or – when also using the ssh2 extension $connection = ssh2_connect(‘shell.example.com’, 22); ssh2_auth_password($connection, ‘username’, ‘password’); $sftp = ssh2_sftp($connection); $stream = fopen(“ssh2.sftp://$sftp/path/to/file”, ‘r’); See http://php.net/manual/en/wrappers.ssh2.php On a side … Read more

How can I force ssh to accept a new host fingerprint from the command line?

The answers here are terrible advice. You should never turn off StrictHostKeyChecking in any real-world system (e.g. it’s probably okay if you’re just playing on your own local home network – but for anything else don’t do it). Instead use: ssh-keygen -R hostname That will force the known_hosts file to be updated to remove the old … Read more

Single line sftp from terminal

Update Sep 2017 – tl;dr Download a single file from a remote ftp server to your machine: sftp {user}@{host}:{remoteFileName} {localFileName} Upload a single file from your machine to a remote ftp server: sftp {user}@{host}:{remote_dir} <<< $’put {local_file_path}’ Original answer: Ok, so I feel a little dumb. But I figured it out. I almost had it … Read more

SFTP Libraries for .NET [closed]

I’ve searched around and found that this fork of SharpSSH and SSH.NET are the most up to date and best maintained libraries for SFTP (not to be confused with FTPS) communication in .NET. SSH.NET is a clean .NET 4.0 implementation of the SFTP protocol, and I’ve used it in a couple of solutions with flying … Read more