I am running Ubuntu 14.04.1 LTS 64-bit on both of my laptops and they are both connected to the same home Wi-Fi at the moment.
I want to connect to the other computer via one of the computers, say through
SSH, how can I do so? What credentials should I know about both computers and which command should I use?
My intention is not simple file sharing and I want some other solution than Teamviewer etc. although X-Windows forwarding would be nice. I appreciate your assistance in this matter.
Edit: When I try SSHing I got the following on the prompt:
VesnogXPS:~$ ssh firstname.lastname@example.org ssh: connect to host 192.168.1.22 port 22: Connection refused
Edit2: The above problem is resolved but now it cannot read the .bashrc on the connected computer the permissions for the file is as follows:
-rw-r--r-- 1 ongun ongun 3567 Jan 4 01:06 .bashrc
The error I get is as follows and it is present in only when connecting from A to B not while connecting from B to A:
email@example.com's password: Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-45-generic x86_64) * Documentation: https://help.ubuntu.com/ Last login: Thu Feb 19 18:52:54 2015 from 192.168.1.22 -bash: /home/ongun/.bashrc: Permission denied
The contents of the ~/.profile on the problematic laptop is:
# ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. #umask 022 # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then "$HOME/.bashrc" PATH=/usr/local/texlive/2013/bin/i386-linux:$PATH; export PATH MANPATH=/usr/local/texlive/2013/texmf-dist/doc/man:$MANPATH; export MANPATH INFOPATH=/usr/local/texlive/2013/texmf-dist/doc/info:$INFOPATH; export INFOPATH fi fi
Figured the problem out it was not sourcing the
.bashrc I did change the line after the second if as follows:
Now everything works perfectly, but I have one more question, why did it use to work for the terminal emulator on the local machine but not SSH itself? I am asking this since both are interactive login shells.