Ubuntu Server SSH configuration file help

This is my sshd_config file settings I can connect to my server with my pc using public key but I can also connect from another pc with the password of sudo user account. How can make the login possible only with public key in SSH and SFTP? Thanks a lot

# This is the sshd server system-wide configuration file.  See # sshd_config(5) for more information.  # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin  # The strategy used for options in the default sshd_config shipped with # OpenSSH is to specify options with their default value where # possible, but leave them commented.  Uncommented options override the # default value.  #Port 22 #AddressFamily any #ListenAddress #ListenAddress ::  #HostKey /etc/ssh/ssh_host_rsa_key #HostKey /etc/ssh/ssh_host_ecdsa_key #HostKey /etc/ssh/ssh_host_ed25519_key  # Ciphers and keying #RekeyLimit default none  # Logging #SyslogFacility AUTH #LogLevel INFO  # Authentication:  LoginGraceTime 1m PermitRootLogin without-password #StrictModes yes MaxAuthTries 3 #MaxSessions 10  PubkeyAuthentication yes  # Expect .ssh/authorized_keys2 to be disregarded by default in future. #AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2  #AuthorizedPrincipalsFile none  #AuthorizedKeysCommand none #AuthorizedKeysCommandUser nobody  # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts #HostbasedAuthentication no # Change to yes if you don't trust ~/.ssh/known_hosts for # HostbasedAuthentication #IgnoreUserKnownHosts no # Don't read the user's ~/.rhosts and ~/.shosts files #IgnoreRhosts yes  # To disable tunneled clear text passwords, change to no here! PasswordAuthentication no PermitEmptyPasswords no  # Change to yes to enable challenge-response passwords (beware issues with # some PAM modules and threads) ChallengeResponseAuthentication no  # Kerberos options #KerberosAuthentication no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes #KerberosGetAFSToken no  # GSSAPI options #GSSAPIAuthentication no #GSSAPICleanupCredentials yes #GSSAPIStrictAcceptorCheck yes #GSSAPIKeyExchange no  # Set this to 'yes' to enable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication and # PasswordAuthentication.  Depending on your PAM configuration, # PAM authentication via ChallengeResponseAuthentication may bypass # the setting of "PermitRootLogin without-password". # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication # and ChallengeResponseAuthentication to 'no'. UsePAM no  #AllowAgentForwarding yes #AllowTcpForwarding yes #GatewayPorts no X11Forwarding yes #X11DisplayOffset 10 #X11UseLocalhost yes #PermitTTY yes PrintMotd no #PrintLastLog yes #TCPKeepAlive yes #UseLogin no #PermitUserEnvironment no #Compression delayed #ClientAliveInterval 0 #ClientAliveCountMax 3 #UseDNS no #PidFile /var/run/sshd.pid #MaxStartups 10:30:100 #PermitTunnel no #ChrootDirectory none #VersionAddendum none  # no default banner path #Banner none  # Allow client to pass locale environment variables AcceptEnv LANG LC_*  # override default of no subsystems Subsystem   sftp    /usr/lib/openssh/sftp-server  # Example of overriding settings on a per-user basis #Match User anoncvs #   X11Forwarding no #   AllowTcpForwarding no #   PermitTTY no #   ForceCommand cvs server 

Emitir Audio que proviene de line in por salida hdmi en ubuntu

Tengo una ubuntu 16.04 que tengo conectado a un proyector por hdmi, he configurado el sonido seleccionado el output para el hdmi,

como en esta web https://itsfoss.com/how-to-fix-no-sound-through-hdmi-in-external-monitor-in-ubuntu/

el caso es que si reproduzco video de youtube o cual otra aplicación el audio se reproduce por el proyector pero lo que quiero es

enviar al proyector el audio que entra por el line in de la tarjeta de sonido y eso no puedo. Si selecciono los speakers, el audio que entra por el line in

si se reproduce correctamente. El caso es que los vumeters de configuracón de las entradas si se mueven por lo que si entra el audio, el problema es no sale por el hdmi.

He mirado el alsamixer y parece que está ok, ¿Puede ser problema del driver de la tarjeta grafica que es la que tiene la salida hdmi? El sistema está recien instalado y por defecto. La tarjeta de sonido es integrada en placa base. He Probado con una tarjeta USB sencilla y lo mismo.

Alguna idea? (El mismo equipo en windows lo hace bien.)


Black Screen with cursor blinking when started Ubuntu on VirtualBox

Ubuntu on my Virtual Machine was running fine when I restarted then suddenly it starts showing a black screen. I googled and tried multiple solutions like:

  1. by disabling the “Enable 3D acceleration” on virtualBox settings
  2. Enabling the “Intel Virtualization Technology” from BIOS

Please note, when I used backup Ubuntu, it works fine. My host system is Ubuntu 18.04.3 LTS. VirtualBox Version 6.0.12, Ubuntu guest OS in VirtualBox is 18.04.2.

I will appreciate if you can help to address the issue

Anaconda Navigator Cant Open on Ubuntu 18.04

I can’t open anaconda-navigator in terminal

Failed to write user configuration file. Please submit a bug report. Traceback (most recent call last):   File "/home/udjo/anaconda3/lib/python3.7/site-packages/anaconda_navigator/config/user.py", line 122, in _save     _write_file(fname)   File "/home/udjo/anaconda3/lib/python3.7/site-packages/anaconda_navigator/config/user.py", line 118, in _write_file     with open(fname, 'w', encoding='utf-8') as configfile: FileNotFoundError: [Errno 2] No such file or directory: '/home/udjo/.anaconda/navigator/anaconda-navigator.ini'  During handling of the above exception, another exception occurred:  Traceback (most recent call last):   File "/home/udjo/anaconda3/bin/anaconda-navigator", line 11, in <module>     sys.exit(main())   File "/home/udjo/anaconda3/lib/python3.7/site-packages/anaconda_navigator/app/main.py", line 99, in main     from anaconda_navigator.utils.logs import clean_logs   File "/home/udjo/anaconda3/lib/python3.7/site-packages/anaconda_navigator/utils/logs.py", line 18, in <module>     from anaconda_navigator.config import (LOG_FILENAME, LOG_FOLDER,   File "/home/udjo/anaconda3/lib/python3.7/site-packages/anaconda_navigator/config/__init__.py", line 27, in <module>     from anaconda_navigator.config.main import CONF   File "/home/udjo/anaconda3/lib/python3.7/site-packages/anaconda_navigator/config/main.py", line 87, in <module>     raw_mode=True,   File "/home/udjo/anaconda3/lib/python3.7/site-packages/anaconda_navigator/config/user.py", line 222, in __init__     old_ver = self.get_version(version)   File "/home/udjo/anaconda3/lib/python3.7/site-packages/anaconda_navigator/config/user.py", line 261, in get_version     return self.get(self.DEFAULT_SECTION_NAME, 'version', version)   File "/home/udjo/anaconda3/lib/python3.7/site-packages/anaconda_navigator/config/user.py", line 392, in get     self.set(section, option, default)   File "/home/udjo/anaconda3/lib/python3.7/site-packages/anaconda_navigator/config/user.py", line 455, in set     self._save()   File "/home/udjo/anaconda3/lib/python3.7/site-packages/anaconda_navigator/config/user.py", line 132, in _save     raise (e)   File "/home/udjo/anaconda3/lib/python3.7/site-packages/anaconda_navigator/config/user.py", line 128, in _save     _write_file(fname)   File "/home/udjo/anaconda3/lib/python3.7/site-packages/anaconda_navigator/config/user.py", line 118, in _write_file     with open(fname, 'w', encoding='utf-8') as configfile: FileNotFoundError: [Errno 2] No such file or directory: '/home/udjo/.anaconda/navigator/anaconda-navigator.ini'

Error while running shell script inside ubuntu VM: -bash: ./install.sh: /bin/bash^M: bad interpreter: No such file or directory

I have 3 shell script files placed inside vagrant directory like so: files placement screenshot

This is the install.sh file:

#!/bin/bash  echo "Launching instances with the following parameters:" echo "" echo "Machine Image ID: $  1" echo "Number of Instances: $  2" echo "Instance Type: $  3" echo "Key Pair Name: $  4" echo "Security Group ID: $  5"  aws ec2 run-instances --image-id $  1 --count $  2 --instance-type $  3 --key-name $  4 --user-data file://install-env.sh --security-group-ids $  5 

This is the install-env.sh file:

#!/bin/bash  sudo apt-get -y update sudo apt-get -y install apache2 php php-gd mysql-server  sudo systemctl enable apache2 sudo systemctl start apache2  

I have another destroy.sh file but it’s not related to this error as of now. This is the command I am trying to execute after I ssh into ubuntu VM (I replaced the ami & sg numbers with * for posting it here):

vagrant@ubuntu-bionic:/vagrant$   ./install.sh ami-*************** 1 t2.micro key-name sg-************** 

This is the error that I am getting:

-bash: ./install.sh: /bin/bash^M: bad interpreter: No such file or directory 

The same command works fine if I have those shell script inside home directory, (which I am not able to see on the UI) and I run the command without navigating to vagrant directory like so:

vagrant@ubuntu-bionic:$   ./install.sh ami-********** 1 t2.micro key-name sg-************** 

Why does it not work if I place the files inside vagrant directory? I want to place it here so that I can make changes in one place and push/pull to/from github, instead of having to copy-paste my changes and then push to github everytime.

Please guide me through the placement of shell script files and the directory navigation on cmd prompt.