Showing posts with label SSH. Show all posts
Showing posts with label SSH. Show all posts

Friday, September 11, 2015

Ansible Rocks

Even when you don't want to create playbooks http://docs.ansible.com/ansible/intro_adhoc.html

Real help with farms of virtual appliances in OpenStack or AWS

Thursday, December 12, 2013

Automating tasks over telnet.

Ok. So it is a Stone Age and no one knows what SSH is. Everybody is using telnet.

Let's automate a service restarting task.

Cool and easy as 1,2,3.

{ \
 sleep 2; \
 echo "root"; \
 sleep 2; \
 echo "password"; \
 sleep 2; \
 echo "ps ax | grep my_cool_service"; \
 sleep 2; \
 echo "OLD_SERVICE_PID=\`ps ax | grep my_cool_service | awk '{print \$1}'\` && kill \$OLD_SERVICE_PID"; \
 sleep 2; \
 echo "service my_cool_service start && ps ax |grep my_cool_service"; \
 sleep 4; \
 } | telnet 10.10.10.10

  

Thursday, October 17, 2013

SSH Port Forward multiple hops

Let's use VNC server two hops away.

ssh -4 -v -A -t -L 15902:localhost:15902 user1@host1 \
ssh -4 -v -A -L    15902:localhost:5900  user2@host2

vncviewer localhost:15902