G33K-TRICKS: Interesting Tricks
Showing posts with label Interesting Tricks. Show all posts
Showing posts with label Interesting Tricks. Show all posts

Thursday, October 18, 2018

How to Setup SFTP server for Free



What exactly SFTP is? And how to Setup SFTP Server


SFTP (SSH File Transfer Protocol) is a secure file transfer protocol and it runs over the SSH and comes with all auth and security that ssh supports. Now-a-days FTP or FTPS is getting replaced by SSH as FTP is considered as not so secure.

The SFTP protocol runs over the SSH protocol as a scheme and it was designed by Tatou Ylonen.
setup SFTP ServerSpecial thing about SFTP is , there are no ports exposed.

SFTP VS. FTPS

People usually wish to check SFTP vs. FTPS. FTPS is essentially the previous ftp protocol run over SSL (Secure Sockets Layer) or TLS (Transport Layer Security).

Benefits of FTP over SFTP includes,
FTPS is essentially FTP, which implies it's code mode, which might corrupt files if the mode isn't properly set and SFTP runs over SSH within the normal SSH port. Thus, no extra ports have to be compelled to be opened on the server and no extra authentication must be maintained. This simplifies configuration and reduces the probability of config errors.
FTPS wants sophisticated firewall configuration and might not work NAT. Ports 989 and 990 have to be compelled to be open. 
FTPS needs an additional server software system package to be put in and patched, whereas SFTP comes with SSH.
What's more, FTPS supports each active and passive modes , that additional complicates firewall configurations and is susceptible to issues.
FTPS can't be used as a File system. 


Here are easy steps to setup Free SFTP server

To setup the Free SFTP server you can download the Rebex Tiny SFTP server
from https://labs.rebex.net/tiny-sftp-server
And surprisingly, it is free for Commericial and Non-commercial purpose.
Once download is finished, unzip the zipped file and run the "RebexTinySftpServer.exe" file.
There would be another file named "RebexTinySftpServer.exe.config" file which is a server configuration file with below config settings available by default.
The configuration is straight-forward , key-value pair and easy to understand.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<!-- user and root dir -->
<add key="userName" value="sftpuser"/>    
<add key="userPassword" value="sftpuser"/>
<add key="userRootDir" value="data"/>

<!-- user public keys for public key authentication (optional) -->
<add key="userPublicKeyDir" value=""/>

<!-- misc config -->
<add key="showUserDetailsOnStartup" value="true"/>

<!-- security -->
<add key="rsaPrivateKeyFile" value="server-private-key-rsa.ppk"/>
<add key="rsaPrivateKeyPassword" value="my-super-secure-password"/>

<add key="dssPrivateKeyFile" value="server-private-key-dss.ppk"/>
<add key="dssPrivateKeyPassword" value="my-super-secure-password"/>

<!-- port -->
<add key="sshPort" value="22"/>

<!-- start server when application is started? -->
<add key="autoStart" value="false"/>
</appSettings>

</configuration>

As SSH works on port 22 so config also has the same.
For further security , you can create RSA and DSA keys (.ppk) and provide the password in config which was used while creating the keys.
If you are not comfortable in creating the SSH keys, you can you this awesome free tool that runs on Windows called "PuttyGen" (a utility for RSA and DSA key generation )

Link to download : https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

If you are working with any SFTP client and you are just looking for test connection with SFTP Server, you dont need to host one. Rebex has already provided a dummy sftp running server at
test.rebex.net  Use demo as username and password as password



Please Note: REBEX SFTP server store the password in clear text as you can see from the config file.
Do let me know if you have any other SFTP server that can be easily setup.
Incoming search: Rebex sftp firewall issues


Saturday, May 6, 2017

Inception with Firefox Browser


How to open Chrome Browser inside Firefox Browser

I am sure you must have seen the movie Inception by Christopher Nolan. The movie is based on a wild theory of dreaming inside a dream. Though we cannot dream with Firefox but the trick is to open a browser inside Firefox. Yes, you can open a new browser tab in the browser tab. That sounds confusing as the movie was.
Here is a screenshot to simplify your thought.

Firefox Inception
FireFox Inception



This is what you need to do

  • Open Firefox
  • Type chrome://browser/content/browser.xul  in the address bar
  • Press Enter
Baam! Inception.
Please note: That is .XUL which is XML User Interface Language by Mozilla for building user interfaces of applications like Firefox.

Something to wonder here - how must I have got the screenshot of the webpage in this webpage while creating this webpage.

Sunday, November 13, 2016

How To Recover Deleted Facebook Photos, Video , Messages and other stuffs


Trick to Recover Data from Facebook


Recover Deleted Facebook messages Photos
Lets assume you have Uploaded a nice Photo to yours over Facebook and then Deleted the copy of it from your computer. And after a while you deleted the same photo from Facebook as well and you dont have any copy of it. What would you do to get your photo back.
Here is the g33ktrick for you to Recover the Deleted Facebook Photos, Videos and other stuffs from your Facebook page.


The point here is, Facebook keeps all of your data in their archive which is downloadable.


You can Follow the steps and you can get back and have access to your deleted messages, Photos,Videos and all other data of your Facebook profile.

1. Login to your facebook account and Go to General Account Settings.
Here is the link: https://www.facebook.com/settings



2. You will see Download a Copy of your Facebook Data on this page.
Click on "Download a Copy" link

3. This will take you to the next page , here you can see "Download Archive" Button,.
Go ahead and Click on it to .




4. On the next screen you will be asked to confirm to Start the Archive of your facebook data as displayed in the screen shot here.
Click on "Start My Archive".




5. Next, you will be told that it will take some time to archive your data and the download link will be sent to your registered email ID .
Wait for Few Minutes and check your mail for facebook download link.





6.  Start downloading the file from the link. Once download is complete, Unzip it. Now you can access all your Photos, Videos. Messages, Friend list etc.
Please note that , the Files will the webpages in .html format. You can just double-click on the file to open and then can see the data on the browser of your choice. From there you just need to Right-click on Photo to save the image.