I need to understand a fundamental concept about terminal multiplexers yet I can't seem to find the answer.
As I understand these programs need to be installed on server but not necessarily on clients. It's not a problem with gnu-screen as it is already installed on most systems but it's not the case for tmux and byobu. The problem is that I don't have permission to install software on the server. Is there a way I can run byobu from my client to show statistics about the server I connect?
Also what exactly is the effect of 'byobu-enable' option?
I think there is a misunderstanding here. When you connect to the server and run a command (byobu in this case), you are running the command on the server. Statistics reported are for the server. It's possible to open a byobu session on your own desktop of course, but if you're ssh'd into a machine, you're very likely to be executing commands on that machine.
byobu-enable sets byobu to launch automatically when you open a terminal. I don't do this since you can have confusion if you have byobu running locally and on the remote end you have connected to, which causes problems when you try to interact with byobu itself.
Related
I'm newly moving from a Linux working environment to Windows, and I'm mainly using local port forwarding+Pycharm to run my python code on a server that is double-hop from my laptop.
I am able to establish the ssh tunnel through Windows cmd or MobaXterm local terminal or MobaXterm tunneling tool. I works fine on my Pycharm, when I check it from tools/deployment/configuration/test connection, and I can also see the files in remote server. But every time I start my Pycharm, it shows two background process, "updating python interpreter" and "updating pycharm helper", and the precess bar simply do not show any moving on! And I cannot run python on remote server, because Pycharm says I lack python helper.
And most wired, when it is running these two precess, my terminal for local port forwarding freezes, and I cannot type in commands in the jump server. And when I try to recheck the connection, it turns out that connection fails.
My ssh tunneling+pycharm deployment used to work fine in my Ubuntu. Thanks anybody who can shed light on my confusion!
Well, thanks everyone, I have solved this problem.
The reason is simple, but I did not notice that the ~/.pycharm_helper 's size is actually changing in the process, while the GUI bar may be not moving.
So it is due to my double-hop inconvenience, and the low Internet speed. I left it in dorm for a whole night out, and it comes out just fine.
My question is somewhat similar to this, but a little different from that:
I want to monitor the file execution/access history on a CentOS 7.2 machine. I know that a remote server is calling some files on my local machine through SSH in order to finish some tasks, so I want to find out what files on my local machine that the server is calling.
I tried to use the terminal command:
ls -lu
but it didn't show any invocation history that was triggered by the remote server through SSH. Later I learned about inotify. But I also heard that it's not available on Centos 7. Is it true? If not, how should I use it? I didn't find a dirty and quick inotify tutorial for centos. Is there any system logs that records this type of information? Any other ideas on how to achieve my goal?
I've being doing a installation process in several machines in virtualbox and I'd like to try automated this process. I can do a expect script (see below), however I can't connect through ssh because this script will configure the network stuff after some other processes.
Where I work now, we use the vmware esxi and I am trying to discover if it's possible to automated the installation process that I said if I setup the vnc viewer in the guest machine. I can do the all process if I do it manually, but I'd like try to automated it. Although I think a expect script will be fine, I'm not connecting by ssh. Is it possible?? I started to think that maybe expect is not my answer here.
The processes is something like this:
Receives "Choose a option: ", sends "1\n"
Receives "Press any key", sends "\n"
Repeat step 2 more two times.
Receives "Do you agree (y/n)?", sends "y\n"
And so on.
The host as I said is a vmware esxi, the guest is similar to a linux and my machine is a fedora 20 (I'm saying this because I dont like the idea of install stuff on esxi).
I need to run some scripts in a windows remote machine from a terminal linux, I've tried using telnet however in the windows machine it's unable and there isn't installed a ssh server. So I need other way to run the command remotely without a graphical interface.
I have the possibility for run the command from a windows machine, however I need to open a SSH Tunnel to see the remote machine, I've used psexec but it didn't work for me.
Do you have access to install software on the remote server?
Your SSH client will not be able to connect to the remote machine unless that machine is running an SSH server to respond to your client's connection request.
There are a number of possible options for SSH servers to run on Windows.
(Google for ssh server windows)
Because SSH gives an external user some access to/control over your server it is designed to be a secure tool. I would therefore recommend using an SSH server which is still actively maintained, and keep it up to date. Servers which are old and no longer supported are are likely to contain known security issues which may never be addressed, thereby leaving your server vulnerable.
There are a number of good free open-source solutions for this, so you shouldn't need to buy anything.
In the past I've worked with Windows machines running Cygwin, with the OpenSSH ssh server installed. Depending how much of the Cygwin system you choose to install, it can make the target Windows host rather like logging into another Linux box in terms of environment.
You can download the installer for Cygwin from http://www.cygwin.com/
I have written an application using ALSA (snd_pcm_open, snd_pcm_readi, etc). The application works perfect locally on my machine. However, when I SSH to another machine and run it through the SSH connection, all calls to snd_pcm_open fails with a message "Device does not exist" or similar. The remote machine has a soundcard just as my local machine has.
What could be the problem here?
Thanks!
EDIT: If I run the application using the console on the remote computer (walk to the computer, login, run the application), the application runs fine.
The problem might be with /dev/snd/* access rights.
Be sure the user is in the audio group.
In my case, I had to do adduser $USER audio, disconnect and then reconnect.
Just to check for the obvious: Are the drivers for the sound card on the remote machine loaded and working correctly? Check /proc/asound/cards and see so that the card is listed.
Just to confirm...you have the application installed on the remote machine and the remote machine has otherwise working aplay etc? The remote machine must be set up so that if you were to login from the console and run the application, it would work
If this is the case then check your environment variables as sometimes they can be subtly different.
Found the reason. Turns out /dev/audio and the devices below /dev/snd/ where all owned by the user logged in on the remote computer, and readable/writable by no one else. For testing I applied chmod 777 /dev/audio /dev/snd/* and it started working.
Anyone know how I can apply a bit more generous permissions to the audio devices for the remote computer (which will last after a reboot)?