Giter Site home page Giter Site logo

vahidhedayati / remote_expect Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 108 KB

expect script which ends user in interact mode - interact can be switched off and command enabled followed by uncommenting last few lines in order automate password driven ssh connection

remote_expect's Introduction

remote_expect

expect script which ends user in interact mode - interact can be switched off and command enabled followed by uncommenting last few lines in order automate password driven ssh connection

to get a script going you need to

sudo-apt-get install expect or 
sudo yum install expect

This running:

  whoami
		myuser
		./ssh-connect.exp localhost
		spawn ssh myuser@localhost
		myuser@localhost's password: 
		Welcome to Ubuntu 12.04.2 LTS (GNU/Linux XXXX)
		
		 * Documentation:  https://help.ubuntu.com/
		
		Last login: Sat Sep  7 20:19:53 2013 from localhost
		sudo bash
		This is BASH 4.2- DISPLAY on localhost:0.0
		
		Sat Sep  7 20:25:09 BST 2013
		whoami
		[20:25 myuser@myuser-DP ~] > sudo bash
		whoami
		This is BASH 4.2- DISPLAY on localhost:0.0
		
		Sat Sep  7 20:25:09 BST 2013
		[20:25 myuser@myuser-DP ~] > whoami
		root
		[20:25 myuser@myuser-DP ~] > whoami
		root

remote_expect's People

Watchers

Vahid Hedayati avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.