Create a simple sftp server for use with Mule - mule

I am looking to setup a local mock SFTP server to use with Mule.
I have a SFTP endpoint and would like to process files from c:/temp/file directory on my local machine.
I have looked at MUnit but would like to run my Mule project like I would in Production and I feel MUnit is more geared towards Unit Testing.
I have looked at FreeSSH and OpenSSH but due to privileges on my laptop I have been unable to install them because they run scripts. I have also looked at CrushFTP but have had problems connecting to the sftp server.
Could anyone recommend a simple SFTP server I could setup locally to work with the Mule connector?
Thanks

I used solarwinds SFTP server to explore mule sftp connector.
http://www.solarwinds.com/free-tools/free-sftp-server/

I made sham-ssh which contains an in-process SFTP server that I use for production-like functional testing. It allows you to use SSH or SFTP over a localhost network connection, and uses a directory on your hard drive to store the files. It's not 1.0 yet, and has no documentation yet, but might work for you.

Related

Steps to transfer file from One Windows Remote Server to another Windows Remote Server using OS Process Sampler in JMeter

I have transferred or copied a files from local machine to Server successfully using OS Process Sampler but unable to transfer a file from One remote server to another remote server on windows.
Can anyone explain me the process or share the steps or command which are being used to do the same.
Thanks
If you have OpenSSH servers on both machines you can use SSH Command sampler to execute scp command for transferring a file from one remote machine to another remote machine
In case of Windows you might have to provide the full path to scp.exe binary like:
C:\Windows\System32\OpenSSH\scp.exe
The exact configuration may differ depending on source/destination paths, whether public key authentication is enabled or not, etc.
Also SSH Command sampler doesn't come with JMeter, you will need to install it as a part of SSH Protocol Support bundle using JMeter Plugins Manager

How to write to remote linux directory

How to expose a directory in remote ubuntu server so that I can read & write to that directory from remote machines.
Actually, I have a web application and I need to write to the AWS EC2 instance's directory and create directories using java program running in another server.
Note: I do not want to run a java program in AWS instance just for writing files.
Thanks in advance
I think you can use sftp from Java: https://www.example-code.com/java/sftp.asp or https://kodehelp.com/java-program-for-uploading-file-to-sftp-server

Mule:Testing HTTP Service on MMC

I have deployed my application running on my local server # http://localhost:8048/myservice?day=xx&month=yy&year=zzzz , it works succesfully on my local machine, in that it downloads a file from the http site. However when I deploy to Mule Management console . I understand that the default port is 8585. When I change the URL to MMC & give the default port with the same path, it does not download the file . Am I missingsomething
The MMC is a utility for managing and monitoring Mule Standalone Runtimes.
One of its functions is to deploy apps to a Runtime. You are not actually deploying to the MMC.
Does this help clarify the situation or do you want any further help on want The MMC is used for and how to do it?
Please check the logs inside MMC.It stores the logfiles date wise.See if your application has been deployed in MMC successfully and if yes then do the following things:
1)If you are using any path to download the file then cross check the path details.You can put a logger to crosscheck that.
2)Put a logger before the business logic and after the business logic and follow what it is logging in the log file.
3)In case your server is Linux then check the path separator pattern
MMC is a Mule Management Console which is used (provides provision) to deploy, undeploy, manage, monitor application and server both. From the statement you mentioned in your query it seems you are trying to deploy the app in the MMC - MMC is not a server its a console where you can register your ESB Runtimes -or- API Gateways (on-Prem) servers so that you can deploy the applications to the server/runtimes (which will go to the runtimes location $MULE_HOME/apps).
Please check if you have registered the server under MMC's Server tab - if not then you have to do this first and then it will allow you to perform application deployment using the MMC's APplication tab where you can upload your deployment archive/artifacts/build to the mmc repo and then you can deploy through the deployment options by selecting your server (which you have registered).
If I am missing something from your statement then please clarify more and will try to help you out here.

What server should I setup to use Mule SFTP Endpoint

I am very new to SFTP endpoint in mule. I am trying implement a sample example using SFTP endpoint.
I have used FTP endpoint and it worked fine with (FileZilla Server version 0.9.43 beta). Does the same FillZilla server work for SFTP endpoint or should I install some other Server?
When I use this FileZilla server I am always getting Connection refused exception
java.io.IOException: Error during login to wsl#localhost: java.net.ConnectException: Connection refused: connect
Can any one please tell me what server exactly I have to install to use SFTP endpoint and direct me to sample SFTP example documentation.
Thanks in advance
FileZilla server does not support SFTP, so you will need another server. See a list of FTP server comparisons here, and select one with SFTP support:
http://en.wikipedia.org/wiki/List_of_FTP_server_software
If you are only trying things out, you could use a mock SFTP server. Check the SFTP transports:
https://github.com/mulesoft/mule/blob/mule-3.x/transports/sftp/src/test/java/org/mule/transport/sftp/AbstractSftpFunctionalTestCase.java
If you are testing you can check out the SFTP server of the Munit
https://github.com/mulesoft/munit/wiki/ftp-server
You can also check the code to see how we did it

Preferred protocols to upload static files to your Apache server?

If you were the administrator of an Apache web server, what protocol(s) would you prefer to provide, for the web developers to upload static files (html/gif/css/...), with the goal of maximum security ?
If you were the web developer/graphic designer, what protocols would you prefer to be available at the Apache server, to upload static files ?
SCP is what I'd go with.
You can even use Filezilla for it and pretend it's unsecure FTP: http://filezilla-project.org/
SSH/SCP. It's simple, fast, free, and can be as secure as you want. Alternatives are FTP (hahahaha, yeah right) and POSTing files over HTTPS.
I give web developers instructions on using an sftp/scp client and a login shell using scponly. That way they get their access to upload files, but I have fewer concerns about them doing bad things to the webserver.
I use ssh config to limit users to sftp on a development server then use version control to review the changes and move them to production with got format-patch
We deploy using Capistrano, which afaik does all its work via git (over SSH) - at least, in our deploy script it is.