You can script it with a tool like expect (there are handy bindings too, like Pexpect for Python).
Related Posts:
- scp gives “not a regular file”
- scp from Linux to Windows
- Getting stty: standard input: Inappropriate ioctl for device when using scp through an ssh tunnel
- Can scp copy directories recursively?
- Confused about stdin, stdout and stderr?
- How to set the environmental variable LD_LIBRARY_PATH in linux
- What’s a .sh file?
- How to fix ‘sudo: no tty present and no askpass program specified’ error?
- How do I grep recursively?
- What does pss mean in /proc/pid/smaps
- apt-get error: Sub-process /usr/bin/dpkg returned an error code (1)
- error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’ — Missing /var/run/mysqld/mysqld.sock
- How do I grep recursively?
- how to find libstdc++.so.6: that contain GLIBCXX_3.4.19 for RHEL 6?
- How to extract C source code from .so file?
- subprocess.Popen(): OSError: [Errno 8] Exec format error in python?
- How to substitute shell variables in complex text files
- Curl command for https ( SSL )
- “sed” command in bash
- How to exclude a directory in find . command
- How can I find all *.js file in directory recursively in Linux?
- Argument list too long error for rm, cp, mv commands
- Difference between using “chmod a+x” and “chmod 755”
- ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known
- WSL – GEDIT Unable to init server: Could not connect: Connection refused
- Python subprocess.Popen “OSError: [Errno 12] Cannot allocate memory”
- How to open some ports on Ubuntu?
- Given two directory trees, how can I find out which files differ by content?
- Uncompress tar.gz file
- What does it mean to mount a file system in linux?
- TCP congestion control version: HTCP module vs highspeed module in linux kernel
- How to use regex with find command?
- CentOS error – sudo: effective uid is not 0, is sudo installed setuid root?
- Merge / convert multiple PDF files into one PDF
- What is the difference between /etc/rc.local and ~/.bashrc?
- Snort Message – WARNING: No preprocessors configured for policy 0
- How do I find the MySQL my.cnf location
- node.js: cannot find module ‘request’
- What is the reason and how to avoid the [FIN, ACK] , [RST] and [RST, ACK]
- wget returns “Unable to establish SSL connection”
- How to make rpm auto install dependencies
- How do I install chkconfig on Ubuntu?
- Apache server keeps crashing, “caught SIGTERM, shutting down”
- List all mounts in Linux
- How to use sed to extract substring
- error : storage class specified for parameter
- Wait for user input in C?
- How do I write stderr to a file while using “tee” with a pipe?
- python-dev installation error: ImportError: No module named apt_pkg
- How to enable Bash in Windows 10 developer preview?
- WordPress Update – This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php
- WordPress sites being filled with random PHP files
- Is it a good idea to edit WordPress within Eclipse? [closed]
- How to run a server on port 80 as a normal user on Linux?
- Copying a large directory tree locally? cp or rsync?
- Check if port is open or closed on a Linux server?
- Moving an already-running process to Screen
- When does `cron.daily` run?
- Permission denied (publickey). SSH from local Ubuntu to Amazon EC2 server
- How to run a command multiple times, using bash shell?
- LVM dangers and caveats
- How to reconnect to a disconnected ssh session
- Should I quit using Ifconfig?
- How to know from which yum repository a package has been installed?
- SSL Certificate Location on UNIX/Linux
- What is “-bash: !”: event not found”
- tar – Remove leading directory components on extraction
- Keeping a linux process running after I logout
- Force dig to resolve without using cache
- How to list Apache enabled modules?
- How to forcibly close a socket in TIME_WAIT?
- How to check if an RSA public / private key pair match
- Colors in bash after piping through less?
- How can I monitor hard disk load on Linux?
- Why does sudo command take long to execute?
- “POSSIBLE BREAK-IN ATTEMPT!” in /var/log/secure — what does this mean?
- How to display certain lines from a text file in Linux?
- What’s the reverse DNS command line utility?
- Can you have more than one ~/.ssh/config file?
- How to add a security group to a running EC2 Instance?
- How bad is it really to install Linux on one big partition?
- How do I extract login history?
- How to force nginx to resolve DNS (of a dynamic hostname) everytime when doing proxy_pass?
- GPG does not have enough entropy
- SSH from A through B to C, using private key on B [closed]
- Is it possible to reboot a Linux OS without rebooting the hardware?
- Why don’t EC2 ubuntu images have swap?
- SSHFS mount that survives disconnect
- Temporarily ignore my `~/.ssh/known_hosts` file?
- Does the “bs” option in “dd” really improve the speed?
- How to get TX/RX bytes without ifconfig?
- What solutions exist to allow the use of revision control for server configuration files? [closed]
- Curl: disable certificate verification
- Is there a way to do a remote “ls” much like “scp” does a remote copy?
- How to apply a filter to real time output of `tail -f `?
- Practical maximum open file descriptors (ulimit -n) for a high volume system
- Dump a linux process’s memory to file
- How to handle relative urls correctly with a reverse proxy
- What is the difference between /sbin/nologin and /bin/false?
- Where’s the conventional place to store git repositories in a linux file system tree?