Posts

Showing posts with the label ssh

Customize ubuntu login console by Cowsay, ascii art

Before this article, I wanna introduce cowsay again, cowsay is an ASCII art generator, which is alway the nerd's favorite toy. Cowsay & Fortune I already used cowsay in my email client, gnus. And at that moment, I found out cowsay's closet mate, fortune . And this time is the moment to make some fun to my ssh login terminal. How to decorate your ssh login console? Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-53-generic x86_64)  * Documentation:  https://help.ubuntu.com/  ____________________________ / Expect the worst, it's the least you \ \ can do.                                            /  --------------------------------------         \   ^__^          \  (oo)\_______             (__)\              )\/\ ...

SSH X11 forwarding

I wrote some ssh port forwarding in a previous post . But there is some difference in X11 port forwarding.  First, Let's introduce some knowledge about X. X system is the standard basic display system in the Unix-like world,  it has an C/S framework -- server and client and they communicate with each other by TCP/IP network. SSH provide X11 forwarding function, which can be used when X server and client do not run in the same host. The following link is a good tutorial in ssh X11 forwarding. http://www.vanemery.com/Linux/XoverSSH/X-over-SSH2.html We can use SSH to do X11 port forwarding (ports 6000-6063). ssh -X -C user@remothost -X: enable X11 forwarding -x: disable X11 forwarding -C: Compress the traffic, useful in the lower network. then, we can run the graphical application in remote host, but displayed in local host. That mean the graphical application running in remote host use the X server in localhost to display itself.

SSH Port forwarding

http://staff.washington.edu/corey/fw/ssh-port-forwarding.html I used ssh to fuck notorious GFW(made by china government), some of it's options related to port forwarding: -L : Local port forward -R : Remote port forward -D : Dynamic port forward -g  : Let another host in the same LAN to use this tunnel. what is port forwarding? First, we should have an ssh connection -- named tunnel. >$ ssh RemoteHost this cmd build a tunnel from LocalHost to RemoteHost. >$ ssh -L localPort:TargetHost:TargetPort RemoteHost this cmd build a tunnel ofcouse. And it also Forwarding any traffic from LocalHost:LocalPort through the tunnel to the RemoteHost, then the RemoteHost forwarding the traffic to the TargetHost:TargetPort. In conclusion, First we have to buid a tunnel, second, ssh collect the traffic from one side of the tunnel and send to another side of tunnel, then In another side, the traffic can be send to the target host. There are two ways of port forwarding in ssh. ...