I am trying to run a jupyter notebook on remote remote machine user#remote and use it from my local machine. I did
local#host $ ssh user#remote
user#remote $ ipython notebook --no-browser --port=8889
http://localhost:8889/?token=2656c58d730bd3779be5f1b6af9356b4de7113c927c9c722
Which starts the jupyter session in remote machine. Then, on my local machine then I do
local#host $ ssh -N -L localhost:8888:localhost:8889 user#remote
when I open this(http://localhost:8888/?token=2656c58d730bd3779be5f1b6af9356b4de7113c927c9c722
), it says
local#host $ channel 2: open failed: connect failed: Connection refused
Related
I use a docker container to try pintos on my mac(M1). Everything behaves well when I start the container by docker start -i pintos.
However, when I use ssh to connect my docker container(i.e., ssh -p xxxx root#local), error message -bash: pintos: command not found occurs if I try pintos -- in directory /pintos/src/threads/build.
I have a nodetimecheck.sh file on a server which has a command like this
echo
tput setaf 2; echo -n " What is my node's local time: "; tput setaf 7; date
When I login to my server with SSH and execute ./nodetimecheck.sh it displays properly.
However, if I try to execute the command from my local machine via ssh like this
ssh -i ~/.ssh/privkey username#serverip ./nodetimecheck.sh
It does display the time, but there is a nagging message
tput: No value for $TERM and no -T specified
Local machine running Ubuntu 18.04 LTS
Remote server on GCP running Ubuntu 18.04 LTS
Found the solution as follows. Supply the TERM=xterm as part of the ssh command
ssh -i ~/.ssh/privkey username#serverip TERM=xterm ./nodetimecheck.sh
I'm running the Linux subsystem for Windows and Xming.
I am attempting to connect via ssh to a remote server and run a GUI program in Xming.
After initiating Xming, I run the following commands:
$ export DISPLAY=:0.0
$ ssh -X user#address
$ ./gui.sh
And I get the following error:
Unable to initialize GTK: could not open display
Exporting the display after I ssh returns the same error.
I have tried using ssh -Y as well.
Is this just a limitation of bash on Windows, or am I missing something?
When running
sudo docker run --net=host -t -e LICENSE=accept -v $(pwd):/installer/cluster ibmcom/icp-inception:2.1.0-ee install
I get fatal: [192.168.201.130] => Failed to connect to the host via ssh: Permission denied (publickey,password).
I have debugged the session:
root#icpecm:/opt/ibm-cloud-private-2.1.0/cluster# ssh -vvv -i cluster/ssh_key root#192.168.201.130
this is successful.
Have you copied the public key in all the nodes?
In your case:
$ ssh-copy-id -i .ssh/id_rsa root#192.168.201.130
I have SSH connection to the server without X session. I've set up SSH to forward X. When I get connected to that server over SSH and type:
user#host-machine:~$ ssh remote-server
user#remote-server:~$ echo hello | xsel -bi
all goes right - I'm getting "hello" on my host's clipboard.
I have simple Docker image based on Ubuntu. I run the the image with following parameters: docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix myimage bash. Then, being inside container I'm typing:
user#host-machine:~$ docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix myimage bash
user#92c40ac9feb7:~$ echo hello | xsel -bi
all goes right - I'm getting "hello" on my host's clipboard.
Now I want to run Docker image on those server being under SSH session with X forwarding enabled. When I'm trying to copy something to the clipboard in this configuration, I'm getting following error:
user#host-machine:~$ ssh remote-server
user#remote-server:~$ docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix myimage bash
user#688e48e4b90a:~$ echo hello | sudo xsel -bi
xsel: Can't open display: (null)
: Connection refused
user#688e48e4b90a:~$
Why I can't get clipboard forwarding working, while being in Docker container under SSH session?