Centos 7 - X11 Forwarding

I've read quite a few articles on this now and I still don't seem to be able to do this so am hoping someone can tell me where I am going wrong...

Background:-
Centos v7 running in a VM
Cygwin installed on the desktop (fresh install)

I have amended the sshd_config on the VM to :-
X11Forwarding yes
X11UseLocalhost no
Disabled selinux and restarted the sshd daemon.

Within cygwin before making the connection I set:-
export DISPLAY=:0
Then run startxwin

Within Xwin.exe I run the following and get the error:-
$ ssh -XY root@192.168.246.130
root@192.168.247.131's password:
X11 forwarding request failed on channel 0
Last login: Tue Jun 2 20:40:44 2015 from 192.168.246.10

Is it something I'm missing?
I'll admit X11 is a weak area for me.


Similar Content



Selinux On Ubuntu Server

Hi All,

Please can someone assist me on this, I enabled Selinux on Ubuntu 14.04 server and it's disabling ssh remote login for all users including root.

From the ssh terminal I get the following error:

ssh root@192.168.x.x
Last login: Wed Mar 25 12:39:02 2015 from 192.168.x.x
/bin/bash: Permission denied
Connection to 192.168.211.135 closed.


tail /var/log/auth.log

ubuntu sshd[1640]: Accepted password for root from 192.168.x.x port 51082 ssh2

ubuntu sshd[1642]: Accepted password for root from 192.168.x.x port 51089 ssh2

ubunt sshd[1640]: Received disconnect from 192.168.x.x: disconnected by user

audit2allow --all

sshd_t

This avc is a constraint violation. you would need to modify the attribute of either the source or target types to allow this access.

possible cause is the source user (system_u) and target user (unconfined_u) are different.

possible cause is the source role (system_r) and target role (unconfined_r) are different.

possible cause is the source level (s0) and target level (s0-s0:c0.c255) are different.

allow sshd_t unconfined_trocess transition.

Please how can I make this changes to take effect.

Thanks in advance.

Booting To Linux On A Win8 UEFI PC

Booting to CentOS Linux problem. I have an HP desktop PC with an AMD CPU and win8.1 installed on it with UEFI as the boot process. The CentOS7 DVD indicates that I have installed the CentOS successfully. When I boot the PC it does take me to a menu offering CentOS and Win8. Win 8 will boot correctly. However, when I try to boot to CentOS I get a screen that says “Kernel not found”. The boot loading process continues until it ultimately brings up a terminal login screen. When I try to login with my password and usr name it tells me that they are wrong. I suspect the Kernel not found is the real problem but I can't get into the CentOS program to see if GRUB or any of the other programs are missing or defective. So far I have not disabled the UEFI since I didn't think I needed to. Any suggestions?

Cannot SSH After Changing Permissions In Root Folder

Hello Guys,

Im fairly new to linux and was mucking around with permissions on root the other day and lost my connection via ssh. Now when i try to connect via ssh I get an error 'connection refused'. My system logs show the following:

Starting sshd: /var/empty/sshd must be owned by root and not group or world-writable.
[FAILED]

I gather this is because I changed some permissions on root. Thing is, as Im unable to connect via ssh, how else can I correct this issue? Im desperate as I have some data on there that I dont want to lose.

Thanks
Mark

SFTP Configuration For Single Directory Per User

Dear Members,

I am trying to configure sftp on my Server (Redhat). But I am facing following issue.

Link used: https://www.linode.com/docs/tools-re...ian-and-ubuntu

These are the parameters added to /etc/ssh/sshd_config file :

Quote:
Match group filetransfer
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
Permission home Directories are as follows :

Quote:
ls -ld /home/test1/
drwxr-xr-x 7 root root 4096 May 14 09:49 /home/test1/

ls -l /home/test1/
total 12
drwxr-xr-x 2 root root 4096 May 14 09:49 docs
drwxr-xr-x 2 root root 4096 May 13 11:43 nitish
drwxr-xr-x 2 root root 4096 May 14 09:49 public_html

Debug Command : sftp -vvv test1@Ipaddress

Code:
debug1: Next authentication method: password
test1@IP-address's password:
debug3: packet_send2: adding 64 (len 53 padlen 11 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug3: Wrote 144 bytes for a total of 1421
debug1: Authentication succeeded (password).
debug2: fd 4 setting O_NONBLOCK
debug3: fd 5 is O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug3: Wrote 128 bytes for a total of 1549
debug3: Wrote -1 bytes for a total of 1549
Write failed: Broken pipe
Couldn't read packet: Connection reset by peer

I need the user can't access/see the other directories other than it's own directory

Waiting for your response.

Thank you

Redhat-Keeda

Centos 5.5 Need To Reset Gui Password Not The Root Password

I found an old laptop that has centos 5.5 installed. I reset the root password, but I need to reset the gui password. Is there a way to view this password or reset it? I have not worked with Linux over 5 years and am rusty on all the commands

Forgotten/compromised Password For Localhost Username Root

hi sir.need ur help. a desktop comp is endorsed to me with Linux system. the previous user failed to give the password for localhost root and im not able to login to the system. I really need to backup the files and programs installed and afraid to reboot since our database program is installed in the pc. would really appreciate your help.ty

Nfsd Not Starting At Boot

Hello,
I can't get nfsd start at boot on openwrt linux.

I followed this guide:
http://wiki.openwrt.org/doc/howto/nfs.server

but when I turn the computer on:

Code:
root@OpenWrt:~# showmount -e localhost
clnt_create: RPC: Program not registered

Code:
root@OpenWrt:~# dmesg | tail
[   22.252000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   24.228000] eth1: link UP - 100/full - flow control off
[   24.244000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   30.124000] svc: failed to register nfsdv3 RPC service (errno 5).
[   31.588000] device eth1 entered promiscuous mode
[   31.596000] br-lan: port 1(eth1) entered forwarding state
[   31.600000] br-lan: port 1(eth1) entered forwarding state
[   31.652000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   31.684000] eth1: link UP - 100/full - flow control off
[   33.604000] br-lan: port 1(eth1) entered forwarding state

but if I do
Code:
root@OpenWrt:~# /etc/init.d/nfsd start
root@OpenWrt:~# showmount -e localhost
Export list for localhost:
/mnt/3tb *

so it works well, but I look at dmesg
Code:
root@OpenWrt:~# dmesg | tail
[   24.228000] eth1: link UP - 100/full - flow control off
[   24.244000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   30.124000] svc: failed to register nfsdv3 RPC service (errno 5).
[   31.588000] device eth1 entered promiscuous mode
[   31.596000] br-lan: port 1(eth1) entered forwarding state
[   31.600000] br-lan: port 1(eth1) entered forwarding state
[   31.652000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   31.684000] eth1: link UP - 100/full - flow control off
[   33.604000] br-lan: port 1(eth1) entered forwarding state
[16642.280000] svc: failed to register lockdv1 RPC service (errno 124).

I tried several times
Code:
root@OpenWrt:~# /etc/init.d/portmap enable
root@OpenWrt:~# /etc/init.d/nfsd  enable

and reboot but, again, I have to start nfsd manually after every reboot.

What am I doing wrong? On Attitude Adjustment I never had any issue.

Please help!

Added 'exit 0' To The Bottom Of .bashrc, Now What?

Centos 6.5

I ran into an interesting problem (on reddit) that I figured I could solve, but I have not been able to. Its simple,.. I added 'exit 0' to /root/.bashrc, and now I am trying to log in via ssh.

Everytime I do, it immediately exits when it runs the .bash_profile, which sources .bashrc, (which is immediate upon 'logging in')

I've tried:

Code:
ssh root@192.168.1.50 -t vim
vim scp://192.168.1.50/.bashrc
vim scp://192.168.1.50/root/.bashrc
ssh root@192.168.1.50 bash --norc
ssh root@192.168.1.50 /bin/bash --norc --noprofile
ssh -T root@192.168.1.50 "mv /root/.bashrc /root/.bashRC"
scp .bashrc root@192.168.1.50:/root/
ssh root@192.168.1.50 /bin/bash --norc --noprofile -vvvvvvvvvv
ssh -vvvvvv root@192.168.1.50 /bin/bash --norc --noprofile
ssh -vvvvvv root@192.168.1.50 /bin/mv /root/.bashrc /root/.bashRC
ssh -t -t root@192.168.1.50 << EOF
mv /root/.bashrc /root/.bashRC
EOF
ssh -t -t root@192.168.1.50 --norc << EOF
echo HELLO > /root/.bashrc
EOF
ssh -tv root@192.168.1.50 rm .bashrc

So,.. I am unable to get back into the system (as root, no other users exist) after adding 'exit 0' to .bashrc

Anyone feel like explaining why all of these failed (aside from saying SSH interactive logins run the .bash_profile/.bashrc files) or, offering a suggestion that works? Seems like if you have the root password, you should be allowed to modify the login process... since... you know... you are root.

Having Issues With Making Use Of Linux On Vmware.

Hi, I downloaded an ISO linux file for my Vmware it was with a read me file that show the login details into the OS. Now have finished the installation of the ISO on my Vmware but the problem I have is it not accepting the login details that came with the ISO I download.
this was the login that came with the ISO:

standard user:
username: user
password: password

administrative user:
username: root
password: password
It not accepting any of it I want to know if I did something wrong or there is master login deatils I can use to get to the desktop.
Am a real newbie this is my first time of dealing with Linux your answers will be appreciated a lot. Thanks.

Need Help, Compiling Hydra On Cygwin Make Error, Installed Packages But Still Get Err

Hi im extremely new to theese things and spent all night trying to do this since, my dad wont let me login to the router so i can forward my ps4 ports, since i expereience extreme delay in gameplay about 1/4 of a second, so im trying to use hydra on cygwin so far i gotten to make step, but i keep getting this error code,

gcc -I. -Wall -O2 -o pw-inspector pw-inspector-logo.o pw-inspector.c
gcc: error: pw-inspector-logo.o: No such file or directory
Makefile:61: recipe for target 'pw-inspector' failed
make: [pw-inspector] Error 1 (ignored)
gcc -I. -Wall -O2 -c hydra-vnc.c -DHAVE_MATH_H
gcc: error: spawn: No such file or directory
Makefile:64: recipe for target 'hydra-vnc.o' failed
make: *** [hydra-vnc.o] Error 1

now do i need to download any packages? or another command please help me out im so close but im only learnt this over night! it would be extremely gratefull