"sudo apt-get install openssh-server"
That's it, you can now connect to your machine via SSH/SFTP from any other machine on the same network, it's easy, fast and secure.
Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts
Sunday, March 28, 2010
Monday, December 28, 2009
Thursday, February 5, 2009
Getting X11 forwarding through ssh working after running su in AIX
After logging to a remote server using the "ssh -X user@host" (assuming that you have enabled X11Forwarding in your "/etc/ssh/sshd_config" file, and then restarted ssh by issuing "stopsrc -g ssh" and then "startsrc -g ssh"), you can run any X-windows application you want ONLY WITH THE USER YOU USED TO LOGIN FROM THE BEGINNING. Whenever you switch your user using "su - username", you won't be able to run any graphical application due to the following two problems:
To solve problem two, you'll have to do the following after login to the server:
"ssh -X root@10.11.12.117"
"xauth list" Output -> "xyosd/unix:10 MIT-MAGIC-COOKIE-1 321c1d6b5bf22484395d0e05b0a29104"
"su - ahmad"
"xauth add xyosd/unix:10 MIT-MAGIC-COOKIE-1 321c1d6b5bf22484395d0e05b0a29104"
Article Resources: "http://www.debian-administration.org/articles/494"
- The $DISPLAY variable value is lost
- X authentication is based on cookies -- secret little pieces of random data that only you and the X server know... So, you need to let the other user know what your cookie is
To solve problem two, you'll have to do the following after login to the server:
- run the command "xauth list" to request the cookie for the current DISPLAY that's connecting to your X server, you'll receive something like that: somehost.somedomain:10 mit-magic-cookie-1 4d22408a71a55b41ccd1657d377923ae
- Switch to the other user by issuing "su - username"
- Copy the above response and paste it to produce this command "xauth add somehost.somedomain:10 mit-magic-cookie-1 4d22408a71a55b41ccd1657d377923ae"
- Important Note: You'll have to repeat the above steps every time you use ssh to login to a server.
"ssh -X root@10.11.12.117"
"xauth list" Output -> "xyosd/unix:10 MIT-MAGIC-COOKIE-1 321c1d6b5bf22484395d0e05b0a29104"
"su - ahmad"
"xauth add xyosd/unix:10 MIT-MAGIC-COOKIE-1 321c1d6b5bf22484395d0e05b0a29104"
Article Resources: "http://www.debian-administration.org/articles/494"
Subscribe to:
Comments (Atom)