Skip to main content

Posts

Showing posts from April, 2015

Tunneling SSH over HTTP Proxy

Many offices and campuses implement proxy server in their networks. This situation is frustating by most developer who maintain any server outside the office or campus networks. So tunneling SSH over HTTP proxy is a best deal for them. Some apps and methods can be used to do that. But, I found this following method is easy. Download corkscrew from http://www.agroman.net/corkscrew/Extract the downloaded file $ tar -xzvf corkscrew.tar.gzGo into corkscrews extracted directory, configure, and install it$ cd corkscrew$ ./configure$ make installCorkscrew is now installed in /usr/local/binAdd SSH configuration file on $HOME/.ssh/configWrite these lines:Host *
     ProxyCommand corkscrew proxy.example.com 8080 %h %p
If your proxy use username and password, you can use this code:Host *
     ProxyCommand corkscrew proxy.example.com 8080 %h %p ~/.ssh/proxyauth
In ~/.ssh/proxyauth, put your credentials: <username>:<password>Now you can try $ ssh yourremote.server

Securely Files Transfer with Remote Server using SFTP

Recently I have post a note about how to transfer files among linux servers using terminal. Now I note some commands while using SFTP. Like SSH, we can start to establish connection with remote server using following command. $ sftp user@remote.server and some command that we'll like to use pwd: check current remote directory locationls: list all files in current remote directorycd: move to other remote directorylpwd: check current local directory locationlls: list all files in current local directorylcd: move to other local directoryget remoteFile localFile: download remoteFile to locaFileget -r someDirectory: download files recursively from a remote directory, -P or -p to maintain appropriate permissionput localFileor put -r localDirectoryto send files to remote serverdf -h to check directory space! to go to local shell and exit to return to SFTP session Complete commands on Ubuntu manuals: http://manpages.ubuntu.com/manpages/utopic/man1/sftp.1.html