I’m new to shell scripts, and I have centos running. I want to write a shell script that ssh a remote machine and execute a bunch of commands. The problem I’m facing is how to provide the username, the password, the remote machine address, and the private access key to a command that shall connect the remote machine. I’ve Google’d
Tag: ssh
Run scripts remotely via SSH
I need to collect user information from 100 remote servers. We have public/private key infrastructure for authentication, and I have configured ssh-agent command to forward key, meaning i can login on any server without password prompt (auto login). Now I want to run a script on all server to collect user information (how many user account we have on all
java application and x11 forwarding
I need to start jperf on virtual server. I configured X11 forwarding via ssh. xclock – is working. But if I start jperf I get: user@client-32:~/sandbox/jperf-2.0.2$ sh jperf.sh Exception in thread “main” java.lang.ExceptionInInitializerError Caused by: java.awt.HeadlessException at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:77) at net.nlanr.jperf.JPerf.(Unknown Source) java version: java version “1.7.0_03” OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3) OpenJDK Client VM (build 22.0-b10, mixed mode, sharing)
Login into EC2 Instance as root
I am using putty to login to my ec2 instance. When i typed root it asked me to login as ec2-user. Authenticating with public key “imported-openssh-key” Please login as the ec2-user user rather than root user. when i did login as ec2-user and tried to run commands like yum install httpd it says Loaded plugins: fastestmirror, priorities, security, update-motd You
rsync over SSH preserve ownership only for www-data owned files
I am using rsync to replicate a web folder structure from a local server to a remote server. Both servers are ubuntu linux. I use the following command, and it works well: The usernames for the local system and the remote system are different. From what I have read it may not be possible to preserve all file and folder
How to download a file from server using SSH? [closed]
Closed. This question is off-topic. It is not currently accepting answers. Closed 10 years ago. Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. I need to download a file from server to my desktop. (UBUNTU 10.04) I don’t have a web access
Run a persistent process via ssh
I’m trying to start a test server via ssh but it always dies once i disconnect from ssh. Is there a way to start a process (run the server) so it doesn’t die upon the end of my ssh session? Answer As an alternative to nohup, you could run your remote application inside a terminal multiplexor, such as GNU screen
SVN Update Crontab Linux
I am trying to figure out how to run a SSH command via cron for linux. The command I want to run is: Something like: Anyone know what I would need to do with the cron line? EDIT: I don’t need it to be SSH, just need to run svn update on the same server as cron to the working
ssh-keygen – how to set an rsa key with a certain username
I just installed ubuntu and would like to set its rsa keys up with bitbucket/github. When I ssh-keygen the keys are generated as they should be which is perfectly usable except the username part. In every rsa key I’ve generated previously, the username section read my email address: No, it’s not a major impediment but if I don’t get this
PuTTY: Change default SSH login directory [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question